Module java.desktop
Package java.awt.font

Class GraphicAttribute

java.lang.Object
java.awt.font.GraphicAttribute
Direct Known Subclasses:
ImageGraphicAttribute, ShapeGraphicAttribute

public abstract class GraphicAttribute extends Object
This class is used with the CHAR_REPLACEMENT attribute.

The GraphicAttribute class represents a graphic embedded in text. Clients subclass this class to implement their own char replacement graphics. Clients wishing to embed shapes and images in text need not subclass this class. Instead, clients can use the ShapeGraphicAttribute and ImageGraphicAttribute classes.

Subclasses must ensure that their objects are immutable once they are constructed. Mutating a GraphicAttribute that is used in a TextLayout results in undefined behavior from the TextLayout.