Class Overview
Implementation of TextLabel based on String.
Summary
Public Methods |
void
|
draw(Graphics2D g, float x, float y)
Render the label at x, y in the graphics.
|
final
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.
|
AffineTransform
|
getBaselineTransform()
|
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.
|
final
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.
|
Shape
|
getOutline(float x, float y)
Return an outline of the characters in the label when rendered at x, y.
|
Rectangle
|
getPixelBounds(FontRenderContext frc, float x, float y)
|
TextSource
|
getSource()
|
final
Rectangle2D
|
getVisualBounds(float x, float y)
Return a rectangle that surrounds the text outline when this label is rendered at x, y.
|
[Expand]
Inherited Methods |
From class
sun.font.TextLabel
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.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
Public Methods
public
void
draw
(Graphics2D g, float x, float y)
Render the label at x, y in the graphics.
public
final
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
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
final
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
Shape
getOutline
(float x, float y)
Return an outline of the characters in the label when rendered at x, y.
public
final
Rectangle2D
getVisualBounds
(float x, float y)
Return a rectangle that surrounds the text outline when this label is rendered at x, y.
Protected Methods