public abstract class

TextLabel

extends Object
java.lang.Object
   ↳ sun.font.TextLabel
Known Direct Subclasses

Class Overview

A label. Visual bounds is a rect that encompasses the entire rendered area. Logical bounds is a rect that defines how to position this next to other objects. Align bounds is a rect that defines how to align this to margins. it generally allows some overhang that logical bounds would prevent.

Summary

Public Constructors
TextLabel()
Public Methods
abstract void draw(Graphics2D g, float x, float y)
Render the label at x, y in the graphics.
void draw(Graphics2D g)
A convenience method that renders the label at 0, 0.
abstract Rectangle2D getAlignBounds(float x, float y)
Return a rectangle that corresponds to the alignment bounds of the text when this label is rendered at x, y.
Rectangle2D getAlignBounds()
A convenience method that returns the align bounds when rendered at 0, 0.
Rectangle2D getItalicBounds()
A convenience method that returns the italic bounds when rendered at 0, 0.
abstract Rectangle2D getItalicBounds(float x, float y)
Return a rectangle that corresponds to the logical bounds of the text, adjusted to angle the leading and trailing edges by the italic angle.
Rectangle2D getLogicalBounds()
A convenience method that returns the logical bounds when rendered at 0, 0.
abstract Rectangle2D getLogicalBounds(float x, float y)
Return a rectangle that corresponds to the logical bounds of the text when this label is rendered at x, y.
abstract Shape getOutline(float x, float y)
Return an outline of the characters in the label when rendered at x, y.
Shape getOutline()
A convenience method that returns the outline when rendered at 0, 0.
abstract Rectangle2D getVisualBounds(float x, float y)
Return a rectangle that surrounds the text outline when this label is rendered at x, y.
Rectangle2D getVisualBounds()
A convenience method that returns the visual bounds when rendered at 0, 0.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TextLabel ()

Public Methods

public abstract void draw (Graphics2D g, float x, float y)

Render the label at x, y in the graphics.

public void draw (Graphics2D g)

A convenience method that renders the label at 0, 0.

public abstract Rectangle2D getAlignBounds (float x, float y)

Return a rectangle that corresponds to the alignment bounds of the text when this label is rendered at x, y. This rectangle is used when positioning text next to a margin. It differs from the logical bounds in that it does not include leading or trailing whitespace.

public Rectangle2D getAlignBounds ()

A convenience method that returns the align bounds when rendered at 0, 0.

public Rectangle2D getItalicBounds ()

A convenience method that returns the italic bounds when rendered at 0, 0.

public abstract Rectangle2D getItalicBounds (float x, float y)

Return a rectangle that corresponds to the logical bounds of the text, adjusted to angle the leading and trailing edges by the italic angle.

public Rectangle2D getLogicalBounds ()

A convenience method that returns the logical bounds when rendered at 0, 0.

public abstract Rectangle2D getLogicalBounds (float x, float y)

Return a rectangle that corresponds to the logical bounds of the text when this label is rendered at x, y. This rectangle is used when positioning text next to other text.

public abstract Shape getOutline (float x, float y)

Return an outline of the characters in the label when rendered at x, y.

public Shape getOutline ()

A convenience method that returns the outline when rendered at 0, 0.

public abstract Rectangle2D getVisualBounds (float x, float y)

Return a rectangle that surrounds the text outline when this label is rendered at x, y.

public Rectangle2D getVisualBounds ()

A convenience method that returns the visual bounds when rendered at 0, 0.