Led Ticker Component v2.2
www.ledticker.net

net.ledticker.demo.elements
Class StockTickerElement

java.lang.Object
  extended bynet.ledticker.demo.elements.AbstractTickerElement
      extended bynet.ledticker.demo.elements.StockTickerElement
All Implemented Interfaces:
TickerElement

public class StockTickerElement
extends AbstractTickerElement

This is a sample element that extends TickerElement - the abstrat class that represents a ticker's text base element.

The purpose of this element is to hold stock quote information: name, last value, trend and percent change. The trend is given by the percent change relative to 0.


Field Summary
 
Fields inherited from class net.ledticker.demo.elements.AbstractTickerElement
tokens
 
Constructor Summary
StockTickerElement(java.lang.String stock)
          Creates a StockTickerElement with the given name
 
Method Summary
 java.lang.String getSymbol()
          Gets the name of the stock
 void setChangePercent(java.lang.Double change)
          Sets the percent change of the stock
 void setLast(java.lang.Double lastValue)
          Sets the last value of the stock
 void setStockDownColor(java.awt.Color c)
          Sets the color to use when representing tokens on a downward trend
 void setStockNeutralColor(java.awt.Color c)
          Sets the color to use when representing tokens on a constant trend
 void setStockUpColor(java.awt.Color c)
          Sets the color to use when representing tokens on an upward trend
 void setSymbolColor(java.awt.Color c)
          Sets the color of the symbol
 
Methods inherited from class net.ledticker.demo.elements.AbstractTickerElement
getTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockTickerElement

public StockTickerElement(java.lang.String stock)
Creates a StockTickerElement with the given name

Parameters:
stock - the stock's name
Method Detail

setLast

public void setLast(java.lang.Double lastValue)
Sets the last value of the stock

See Also:
net.ledticker.demo.elements.StockTickerElementUpdater#setLast(double)

setChangePercent

public void setChangePercent(java.lang.Double change)
Sets the percent change of the stock

Parameters:
change - the percent change of the stock
See Also:
net.ledticker.demo.elements.StockTickerElementUpdater#setChange(double)

getSymbol

public java.lang.String getSymbol()
Gets the name of the stock

Returns:
the name of the stock

setStockUpColor

public void setStockUpColor(java.awt.Color c)
Sets the color to use when representing tokens on an upward trend

Parameters:
c - the new upward trend color

setStockNeutralColor

public void setStockNeutralColor(java.awt.Color c)
Sets the color to use when representing tokens on a constant trend

Parameters:
c - the new constant trend color

setStockDownColor

public void setStockDownColor(java.awt.Color c)
Sets the color to use when representing tokens on a downward trend

Parameters:
c - the new downward trend color

setSymbolColor

public void setSymbolColor(java.awt.Color c)
Sets the color of the symbol

Parameters:
c - the new symbol color

Led Ticker Component v2.2
www.ledticker.net