Class sgraphics.figure.FigLabel
All Packages Class Hierarchy This Package Previous Next Index
Class sgraphics.figure.FigLabel
java.lang.Object
|
+----sgraphics.GlyphImpl
|
+----sgraphics.figure.Figure
|
+----sgraphics.figure.FigLabel
- public class FigLabel
- extends Figure
- implements Runnable
A text label.
Does not scale the point size if the allocation changes, nor does
the position scale. If the label is vertical, the alignment is zero
instead of the font's ascent.
-
HORIZONTAL
-
-
VERTICAL
-
-
FigLabel(String)
-
-
FigLabel(String, boolean, boolean)
-
-
FigLabel(String, boolean, int)
-
-
allocate(Allocation)
-
-
draw(Painter)
-
-
length()
-
-
needRedraw()
- This calls up the parent chain which leads to redrawing
all the glyphs under the Viewer.
-
pick(Picker)
-
-
position(float, float)
- This will return the character position that would be hit for the
given event coordinates.
-
requirements()
- Return requirements based on the text.
-
run()
-
-
setStyle(FigureStyle)
-
HORIZONTAL
public final static int HORIZONTAL
VERTICAL
public final static int VERTICAL
FigLabel
public FigLabel(String text)
FigLabel
public FigLabel(String text,
boolean run,
boolean draw)
FigLabel
public FigLabel(String text,
boolean draw,
int direction)
run
public void run()
requirements
public Requirements requirements()
- Return requirements based on the text.
- Returns:
- the requirements.
- Overrides:
- requirements in class GlyphImpl
setStyle
public void setStyle(FigureStyle style)
- Overrides:
- setStyle in class Figure
allocate
public synchronized void allocate(Allocation allocation)
- Overrides:
- allocate in class GlyphImpl
draw
public synchronized void draw(Painter painter)
- Overrides:
- draw in class GlyphImpl
pick
public void pick(Picker pick)
- Overrides:
- pick in class GlyphImpl
needRedraw
public synchronized void needRedraw()
- This calls up the parent chain which leads to redrawing
all the glyphs under the Viewer.
- Overrides:
- needRedraw in class GlyphImpl
position
public int position(float x,
float y)
- This will return the character position that would be hit for the
given event coordinates. For horizontal labels, only x is used.
For vertical labels, only y is used. Coordinates are any
valid event coordinates, but if the coordinates are outside
of the allocation this will return 0.
- Parameters:
- x - the x coordinate.
- y - the y coordinate.
- Returns:
- the character position hit starting at 0. If nothing
is hit, then zero is returned.
- Overrides:
- position in class Figure
length
public int length()
All Packages Class Hierarchy This Package Previous Next Index