|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.View | +--javax.swing.text.GlyphView | +--javax.swing.text.LabelView
A LabelView is a styled chunk of text that represents a view mapped over an element in the text model. It caches the character level attributes used for rendering.
Inner classes inherited from class javax.swing.text.GlyphView |
GlyphView.GlyphPainter |
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, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
LabelView(Element elem)
Constructs a new view wrapped on an element. |
Method Summary | |
void |
changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. |
Color |
getBackground()
Fetch the background color to use to render the glyphs. |
Font |
getFont()
Fetch the font that the glyphs should be based upon. |
protected FontMetrics |
getFontMetrics()
Deprecated. FontMetrics are not used for glyph rendering when running in the Java2 SDK. |
Color |
getForeground()
Fetch the foreground color to use to render the glyphs. |
boolean |
isStrikeThrough()
Determine if the glyphs should have a strikethrough line. |
boolean |
isSubscript()
Determine if the glyphs should be rendered as superscript. |
boolean |
isSuperscript()
Determine if the glyphs should be rendered as subscript. |
boolean |
isUnderline()
Determine if the glyphs should be underlined. |
protected void |
setPropertiesFromAttributes()
Set the cached properties from the attributes. |
protected void |
setStrikeThrough(boolean s)
Set whether or not the view has a strike/line through it. |
protected void |
setSubscript(boolean s)
Set whether or not the view represents a subscript. |
protected void |
setSuperscript(boolean s)
Set whether or not the view represents a superscript. |
protected void |
setUnderline(boolean u)
Set whether or not the view is underlined. |
Methods inherited from class javax.swing.text.GlyphView |
breakView, checkPainter, clone, createFragment, getAlignment, getBreakWeight, 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, getAttributes, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getView, getViewCount, getViewFactory, 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 |
Constructor Detail |
public LabelView(Element elem)
elem
- the elementMethod Detail |
protected void setUnderline(boolean u)
protected void setStrikeThrough(boolean s)
protected void setSuperscript(boolean s)
protected void setSubscript(boolean s)
protected void setPropertiesFromAttributes()
protected FontMetrics getFontMetrics()
public Color getBackground()
getBackground
in class GlyphView
public Color getForeground()
getForeground
in class GlyphView
public Font getFont()
getFont
in class GlyphView
public boolean isUnderline()
isUnderline
in class GlyphView
public boolean isStrikeThrough()
isStrikeThrough
in class GlyphView
public boolean isSubscript()
isSubscript
in class GlyphView
public boolean isSuperscript()
isSuperscript
in class GlyphView
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
changedUpdate
in class GlyphView
e
- the change information from the associated documenta
- the current allocation of the viewf
- the factory to use to rebuild if the view has childrenView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.