Module java.desktop

Class GlyphView

java.lang.Object
javax.swing.text.View
javax.swing.text.GlyphView
All Implemented Interfaces:
Cloneable, SwingConstants, TabableView
Direct Known Subclasses:
LabelView

public class GlyphView extends View implements TabableView, Cloneable
A GlyphView is a styled chunk of text that represents a view mapped over an element in the text model. This view is generally responsible for displaying text glyphs using character level attributes in some way. An implementation of the GlyphPainter class is used to do the actual rendering and model/view translations. This separates rendering from layout and management of the association with the model.

The view supports breaking for the purpose of formatting. The fragments produced by breaking share the view that has primary responsibility for the element (i.e. they are nested classes and carry only a small amount of state of their own) so they can share its resources.

Since this view represents text that may have tabs embedded in it, it implements the TabableView interface. Tabs will only be expanded if this view is embedded in a container that does tab expansion. ParagraphView is an example of a container that does tab expansion.

Since:
1.3