Led Display Component v1.0
www.LedTicker.net/display

net.leddisplay.elements
Class Token

java.lang.Object
  extended bynet.leddisplay.elements.Token
Direct Known Subclasses:
ArrowToken, NumberToken, TextToken

public abstract class Token
extends java.lang.Object

This abstract class represents an item of a net.leddisplay.AbstractDisplayElement. net.leddisplay.AbstractDisplayElement can contain any number of Tokens and the data it stores can be changed in real-time. Other important property of a token is color.

See Also:

Constructor Summary
Token()
          Creates a token with a DefaultColorModel
Token(ColorModel colorModel)
          Creates a token with a custom ColorModel
 
Method Summary
 ColorModel getColorModel()
          Gets the ColorModel used by this token
abstract  java.lang.String getDisplayValue()
          Gets the String representation of the token that will be displayed
 void setColorModel(ColorModel colorModel)
          Sets the color model of this token
abstract  void setValue(java.lang.Object value)
          Sets the token's value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Token

public Token()
Creates a token with a DefaultColorModel


Token

public Token(ColorModel colorModel)
Creates a token with a custom ColorModel

Parameters:
colorModel - the custom ColorModel
Method Detail

getColorModel

public ColorModel getColorModel()
Gets the ColorModel used by this token

Returns:
the ColorModel of this token

setColorModel

public void setColorModel(ColorModel colorModel)
Sets the color model of this token

Parameters:
colorModel -

getDisplayValue

public abstract java.lang.String getDisplayValue()
Gets the String representation of the token that will be displayed

Returns:
the token's String representation

setValue

public abstract void setValue(java.lang.Object value)
Sets the token's value

Parameters:
value - the token's value
Throws:
java.lang.IllegalArgumentException - if the given value's class does not corresponds to the implementation value's class

Led Display Component v1.0
www.LedTicker.net/display