java.lang.Object
javax.swing.text.View
javax.swing.text.GlyphView
javax.swing.text.LabelView
- All Implemented Interfaces:
Cloneable
,SwingConstants
,TabableView
- Direct Known Subclasses:
InlineView
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.-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.text.GlyphView
GlyphView.GlyphPainter
-
Field Summary
Fields declared in class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields declared in 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Fetches the background color to use to render the glyphs.getFont()
Fetches the font that the glyphs should be based upon.protected FontMetrics
Deprecated.FontMetrics are not used for glyph rendering when running in the JDK.Fetches the foreground color to use to render the glyphs.boolean
Determines if the glyphs should have a strikethrough line.boolean
Determines if the glyphs should be rendered as superscript.boolean
Determines if the glyphs should be rendered as subscript.boolean
Determines if the glyphs should be underlined.protected void
setBackground
(Color bg) Sets the background color for the view.protected void
Sets the cached properties from the attributes.protected void
setStrikeThrough
(boolean s) Sets whether or not the view has a strike/line through it.protected void
setSubscript
(boolean s) Sets whether or not the view represents a subscript.protected void
setSuperscript
(boolean s) Sets whether or not the view represents a superscript.protected void
setUnderline
(boolean u) Sets whether or not the view is underlined.Methods declared in class javax.swing.text.GlyphView
breakView, checkPainter, clone, createFragment, getAlignment, getBreakWeight, getEndOffset, getGlyphPainter, getMinimumSpan, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText,