javax.swing.text.html
Class BRView
java.lang.Object
javax.swing.text.View
javax.swing.text.GlyphView
javax.swing.text.LabelView
javax.swing.text.html.InlineView
javax.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
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 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.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 |
attr
AttributeSet attr
BRView
public BRView(Element elem)
- Creates a new view that represents a <BR> element.
- Parameters:
elem
- the element to create a view for
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_AXISpos
- 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