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

net.leddisplay
Interface LedDisplay


public interface LedDisplay

This interface is a proxy for the led display class which is a JComponent that is obtained via getComponent method. To create a led display use LedDisplayFactory.createLedDisplay()

The display content is a DisplayElement which is composed of Tokens.

See Also:
LedDisplayFactory, DisplayElement, Token

Field Summary
static int CENTER
          Anchor constants
static int EAST
           
static int NORTH
           
static int NORTHEAST
           
static int NORTHWEST
           
static int SOUTH
           
static int SOUTHEAST
           
static int SOUTHWEST
           
static int WEST
           
 
Method Summary
 javax.swing.JComponent getComponent()
          Gets the JComponent used to display the contents of the led display.
 void setAnchor(int anchor)
          Sets the location of the element on the display when the display area is larger than the element.
 void setBackgroundColor(java.awt.Color color)
          Sets the background color of the display
 void setDisplayElement(DisplayElement element)
          Sets display's element
 void setDotGaps(int hGap, int vGap)
          Sets the gaps, in pixels, between two ticker leds.
 void setDotOffColor(java.awt.Color color)
          Sets the color of a turned-off led
 void setDotSize(int width, int height)
          Sets the dimensions, in pixels, of the display's led Default values are (1, 1).
 void setPadding(int top, int left, int bottom, int right)
          Sets the number of dots separating the element from the edges of the component.
 void setTokenGap(int gap)
          Sets the gap, in dots, between two tokens of an element.
 void update()
          Signals the display that the element changed it's value and that it's led display should be updated.
 

Field Detail

CENTER

public static final int CENTER
Anchor constants

See Also:
Constant Field Values

NORTH

public static final int NORTH
See Also:
Constant Field Values

WEST

public static final int WEST
See Also:
Constant Field Values

EAST

public static final int EAST
See Also:
Constant Field Values

SOUTH

public static final int SOUTH
See Also:
Constant Field Values

NORTHWEST

public static final int NORTHWEST
See Also:
Constant Field Values

NORTHEAST

public static final int NORTHEAST
See Also:
Constant Field Values

SOUTHWEST

public static final int SOUTHWEST
See Also:
Constant Field Values

SOUTHEAST

public static final int SOUTHEAST
See Also:
Constant Field Values
Method Detail

setDisplayElement

public void setDisplayElement(DisplayElement element)
Sets display's element

Parameters:
element - the element to be displayed

update

public void update()
Signals the display that the element changed it's value and that it's led display should be updated.


setPadding

public void setPadding(int top,
                       int left,
                       int bottom,
                       int right)
Sets the number of dots separating the element from the edges of the component.

Parameters:
top - leading dots from top
left - leading dots from left
bottom - leading dots from bottom
right - leading dots from right

setAnchor

public void setAnchor(int anchor)
Sets the location of the element on the display when the display area is larger than the element.

Parameters:
anchor -

setDotSize

public void setDotSize(int width,
                       int height)
Sets the dimensions, in pixels, of the display's led Default values are (1, 1).

Parameters:
width - the width of the led
height - the height of the led

setDotGaps

public void setDotGaps(int hGap,
                       int vGap)
Sets the gaps, in pixels, between two ticker leds. Default values are (1, 1).

Parameters:
hGap - the horizontal gap
vGap - the vertical gap

setTokenGap

public void setTokenGap(int gap)
Sets the gap, in dots, between two tokens of an element. Default value is 2.

Parameters:
gap - the gap between the elements' tokens

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Sets the background color of the display

Parameters:
color - the background color of the display

setDotOffColor

public void setDotOffColor(java.awt.Color color)
Sets the color of a turned-off led

Parameters:
color - the color of a turned-off led

getComponent

public javax.swing.JComponent getComponent()
Gets the JComponent used to display the contents of the led display.

Returns:
the component where the display is rendered

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