|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jcontrol.ui.vole.Component
|
+--jcontrol.ui.vole.TextScroller
This class provides a graphical TextScroller component for the
Vole GUI. It implements the Animateable interface
and therefore should be added to an AnimationContainer.
| Field Summary | |
protected int |
align
|
static int |
ALIGN_CENTER
Constant value for center alignment |
static int |
ALIGN_LEFT
Constant value for left alignment |
static int |
ALIGN_RIGHT
Constant value for right alignment |
protected int |
lh
|
protected int |
line
|
protected java.lang.String[] |
lines
|
protected int |
offs
|
protected int |
step
|
protected int[] |
xpos
|
| Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
| Constructor Summary | |
TextScroller(java.lang.String[] lines,
int x,
int y,
int width,
int height,
int align)
Creates a new TextScroller containing the specified text. |
|
| Method Summary | |
void |
animate()
The animate method of the text scroller. |
void |
paint()
Draws the text scroller. |
void |
setStep(int step)
Sets the step width of this text scroller in pixels. |
boolean |
transferFocus()
Don't gain input focus. |
| Methods inherited from class jcontrol.ui.vole.Component |
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setLocation, setParent, setVisible, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
| Field Detail |
protected int align
public static final int ALIGN_CENTER
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
protected int lh
protected int line
protected java.lang.String[] lines
protected int offs
protected int step
protected int[] xpos
| Constructor Detail |
public TextScroller(java.lang.String[] lines,
int x,
int y,
int width,
int height,
int align)
lines - Some lines of text to display in this TextScroller.x - y - width - height - align - Specifies the alignment of the text. Possible values are
ALIGN_CENTER, ALIGN_LEFT and
ALIGN_RIGHT.
| Method Detail |
public void animate()
AnimationContainer,
the component
scrolls the text. The scroll speed and direction
depends on the step value, which can be set
with setStep(int step).
animate in interface Animateablepublic void paint()
paint in class Componentpublic void setStep(int step)
step - The step width.
public boolean transferFocus()
transferFocus in class Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||