Class Ticker


  extended by Object
      extended by Component
          extended by Label
              extended by Ticker

public class Ticker
extends Label

Implements a "ticker-tape", a piece of text that runs continuously across the component area. Ticker animation starts automatically when it's first painted on screen and stops when it's no longer visible. When the text is changed with Component.setText(String) the ticker animation starts from the beginning.

Ticker has following special style customizations:

Loop

On loop mode the text is initially positioned just over right border of component area so that none of the text is visible. When animation begins it moves from right-to-left until it has completely passed over the left border of component area. After whole loop has been been completed the Ticker sends ITEM_CHANGED action with itself as source. Text of ticker can be safely changed (without interrupting the animation) when action is received.

Bounce

On bounce mode the text is always (partially) visible and it animates between states where first character touches the left border and last character touches the right border. If the text is smaller than available area it will not animate at all.


Constructor Summary
Ticker(Style style, String text)
          Constructs a new Ticker component.
 
Method Summary
 
Methods inherited from class Component
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size
 
Methods inherited from class Object
toString, equals, hashCode
 
Methods inherited from
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ticker

public Ticker(Style style,
              String text)
Constructs a new Ticker component.

Parameters:
style - Style to use
text - Text to use