|
|||||||||
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
public class 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
.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary | |
---|---|
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 |
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
TextScroller(String[] items,
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, setParent, setVisible, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
public static final int ALIGN_CENTER
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
Constructor Detail |
---|
public TextScroller(String[] items, int x, int y, int width, int height, int align)
items
- 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 paint()
paint
in class Component
public void setStep(int step)
step
- The step width.
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 m_step)
.
animate
in interface Animateable
public boolean transferFocus()
transferFocus
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |