Led Display Swing Component
swing component DOCS

Led Display Swing Component is a java swing library that offers scrolling feature into a visual display similar to electric leds.

The design of the library allows simple usage and integration with any type of data to be displayed.

This page presents a general overlook of the component. Here are some additional resources of interest:

1. USAGE SCENARIOS

Stock Market Quotes: the most interesting usage and the base we started in developing this component is stock quotes. The component can be used to show quote for a symbol in a nice and trendy display that is quite similar to offline boards of stock exchanges or maybe to New York Times Square ticker.

News: display of news is other usage more users might be interested in using this ticker for.

Combined data: the API framework allows simple integration of more data types from more sources in the same instance of the ticker.

2. GUI DESIGN

The ticker displays a string that is composed of elements. Each element is composed of tokens. Each tokens represents one or more characters. Each character is displayed on a matrix of 5x7 dots. A dot is a custom size recangle that represents a led in a phisycal led display. A dot can be turned on and turned off. Turn on color is set at token level, turn off is set as component level. Also background-color is also set at component level. Ather parameters of the visual structure are:

  • element gap: space between elements set in dots;
  • tokens gap: space between tokens set in dots;
  • dot size: width and height or the dot rectangle set in pixels;
  • dot gaps: horizontal spacing between dots in pixels;

3. LIBRARY ARCHITECTURE

The abstract representation of the display is the LedDisplay interface. The LedDisplayFactory gives concrete implementations of this interface. The interface is used to control the functionality and parameters of the ticker.

The abstract representation of the data scrolled by the ticker is the DisplayElement interface and its atomic sub-component, Token. A token is a sequence of characters with the same color. The tokens embed the types of data scrolled by the ticker, like text, numbers, percents, arrows, while the element groups more tokens representing a concept, like a stock tick or news.

Main purpose of splitting elements into tokens is to allow different coloring for each token. Each token of an element can have its own color or they can have the same color. For example, in a stock tick element you can have each token (the stock name, the last value, etc.) use its own set of colors (to represent changes in trend). Or, in a news, where usually all the words have the same color, you might want to use a different color to highlight a name. All this can be done through the ColorModel interface. It allows each token in an element to have a whole set of colors, allowing the change of the token's color depending on specific circumstances. Another benefit is that the tokens of an element can share the same ColorModel, thus ensuring that they have the same behaviour in terms of color.

java ticker | java news ticker | stock applets | swing date picker