public abstract class GraphicAttribute extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM_ALIGNMENT |
static int |
CENTER_BASELINE |
static int |
HANGING_BASELINE |
static int |
ROMAN_BASELINE |
static int |
TOP_ALIGNMENT |
| Modifier | Constructor and Description |
|---|---|
protected |
GraphicAttribute(int alignment)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
draw(Graphics2D graphics,
float x,
float y)
Draws the graphic.
|
abstract float |
getAdvance()
Gets the distance from the origin of its graphic to the right side of the
bounds of its graphic.
|
int |
getAlignment()
Gets the alignment.
|
abstract float |
getAscent()
Gets the positive distance from the origin of its graphic to the top of
bounds.
|
Rectangle2D |
getBounds()
Returns a Rectangle2D that encloses the rendered area.
|
abstract float |
getDescent()
Gets the distance from the origin of its graphic to the bottom of the bounds.
|
GlyphJustificationInfo |
getJustificationInfo()
Returns the justification information for this object.
|
public static final int BOTTOM_ALIGNMENT
public static final int CENTER_BASELINE
public static final int HANGING_BASELINE
public static final int ROMAN_BASELINE
public static final int TOP_ALIGNMENT
protected GraphicAttribute(int alignment)
alignment - - the alignment to use for the graphicpublic abstract void draw(Graphics2D graphics, float x, float y)
graphics - - the graphics configuration to usex - - the x locationy - - the y locationpublic abstract float getAdvance()
public abstract float getAscent()
public abstract float getDescent()
public final int getAlignment()
public Rectangle2D getBounds()
public GlyphJustificationInfo getJustificationInfo()