javax.swing.text.html
Class BRView

java.lang.Object
  extended byjavax.swing.text.View
      extended byjavax.swing.text.GlyphView
          extended byjavax.swing.text.LabelView
              extended byjavax.swing.text.html.InlineView
                  extended byjavax.swing.text.html.BRView
All Implemented Interfaces:
Cloneable, SwingConstants, TabableView

class BRView
extends InlineView

Processes the <BR> tag. In other words, forces a line break.

Author:
Sunita Mani

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.GlyphView
GlyphView.GlyphPainter
 
Field Summary
(package private)  AttributeSet attr
           
 
Fields inherited from class javax.swing.text.html.InlineView
 
Fields inherited from class javax.swing.text.LabelView
 
Fields inherited from class javax.swing.text.GlyphView
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
BRView(Element elem)
          Creates a new view that represents a <BR> element.
 
Method Summary
 int getBreakWeight(int axis, float pos, float len)
          Forces a line break.
 
Methods inherited from class javax.swing.text.html.InlineView
changedUpdate, getAttributes, getLongestWordSpan, getStyleSheet, setPropertiesFromAttributes
 
Methods inherited from class javax.swing.text.LabelView
getBackground, getFont, getFontMetrics, getForeground, isStrikeThrough, isSubscript, isSuperscript, isUnderline, setStrikeThrough, setSubscript, setSuperscript, setUnderline
 
Methods inherited from class javax.swing.text.GlyphView
breakView, checkPainter, clone, createFragment, getAlignment, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, insertUpdate, modelToView, paint, removeUpdate, setGlyphPainter, viewToModel
 
Methods inherited from class javax.swing.text.View
append, forwardUpdate, forwardUpdateToView, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.text.TabableView
getPartialSpan, getTabbedSpan
 

Field Detail

attr

AttributeSet attr
Constructor Detail

BRView

public BRView(Element elem)
Creates a new view that represents a <BR> element.

Parameters:
elem - the element to create a view for
Method Detail

getBreakWeight

public int getBreakWeight(int axis,
                          float pos,
                          float len)
Forces a line break.

Overrides:
getBreakWeight in class InlineView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
pos - the potential location of the start of the broken view >= 0. This may be useful for calculating tab positions.
len - specifies the relative length from pos where a potential break is desired >= 0.
Returns:
View.ForcedBreakWeight
See Also:
LabelView, ParagraphView, View.BadBreakWeight, View.GoodBreakWeight, View.ExcellentBreakWeight, View.ForcedBreakWeight