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

net.leddisplay.demo.elements
Class StockDisplayElement

java.lang.Object
  extended bynet.leddisplay.demo.elements.AbstractDisplayElement
      extended bynet.leddisplay.demo.elements.StockDisplayElement
All Implemented Interfaces:
DisplayElement

public class StockDisplayElement
extends AbstractDisplayElement

This is a sample element that extends AbstractDisplayElement - the abstrat class that represents a display'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.leddisplay.demo.elements.AbstractDisplayElement
tokens
 
Constructor Summary
StockDisplayElement(java.lang.String stock)
          Creates a StockDisplayElement 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.leddisplay.demo.elements.AbstractDisplayElement
getTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockDisplayElement

public StockDisplayElement(java.lang.String stock)
Creates a StockDisplayElement 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


setChangePercent

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

Parameters:
change - the percent change of the stock

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 Display Component v1.0
www.LedTicker.net/display