org.jscience.awt.displays
Class LEDDisplayBase

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by org.jscience.awt.displays.LEDDisplayBase
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
IntLEDDisplay

public abstract class LEDDisplayBase
extends java.awt.Canvas

DOCUMENT ME!

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.lang.String caption
          DOCUMENT ME!
protected  boolean captionAtBottom
          DOCUMENT ME!
static java.lang.String DEFAULTFONTNAME
          DOCUMENT ME!
static int DEFAULTFONTSIZE
          DOCUMENT ME!
static int DEFAULTFONTSTYLE
          DOCUMENT ME!
static java.awt.Color DEFAULTLEDBGCOLOR
          DOCUMENT ME!
static java.awt.Color DEFAULTLEDCOLOR
          DOCUMENT ME!
static java.awt.Color DEFAULTPANELCOLOR
          DOCUMENT ME!
static java.awt.Color DEFAULTTEXTCOLOR
          DOCUMENT ME!
protected  int digitHeight
          DOCUMENT ME!
protected  java.awt.Image[] digitImages
          DOCUMENT ME!
protected  boolean digitsValid
          DOCUMENT ME!
protected  int digitWidth
          DOCUMENT ME!
protected  java.awt.Font font
          DOCUMENT ME!
protected  java.lang.String fontName
          DOCUMENT ME!
protected  int fontSize
          DOCUMENT ME!
protected  int fontStyle
          DOCUMENT ME!
protected  int height
          DOCUMENT ME!
protected  java.awt.Color ledBGColor
          DOCUMENT ME!
protected  java.awt.Color ledOffColor
          DOCUMENT ME!
protected  java.awt.Color ledOnColor
          DOCUMENT ME!
static int MINUSSIGNHEIGHT
          DOCUMENT ME!
protected  int numberOfDigits
          DOCUMENT ME!
protected  java.awt.Color panelColor
          DOCUMENT ME!
protected  boolean raised
          DOCUMENT ME!
protected  int separatorMode
          DOCUMENT ME!
protected  int separatorWidth
          DOCUMENT ME!
static double SEPARATORWIDTHPERCENT
          DOCUMENT ME!
protected  java.awt.Color textColor
          DOCUMENT ME!
protected  int width
          DOCUMENT ME!
static int XPAD
          DOCUMENT ME!
static int YPAD
          DOCUMENT ME!
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LEDDisplayBase(int width, int height, int numberOfDigits, boolean raised, java.lang.String fontName, int fontStyle, int fontSize, java.lang.String caption, boolean captionAtBottom, java.awt.Color panelColor, java.awt.Color ledColor, java.awt.Color ledBGColor, java.awt.Color textColor)
          Creates a new LEDDisplayBase object.
 
Method Summary
 int calcDisplayWidth()
          DOCUMENT ME!
 java.lang.String getCaption()
          DOCUMENT ME!
 boolean getCaptionAtBottom()
          DOCUMENT ME!
 java.awt.Font getFont()
          DOCUMENT ME!
 java.lang.String getFontName()
          DOCUMENT ME!
 int getFontSize()
          DOCUMENT ME!
 int getFontStyle()
          DOCUMENT ME!
 int getHeight()
          DOCUMENT ME!
 java.awt.Color getLEDBGColor()
          DOCUMENT ME!
 java.awt.Color getLEDColor()
          DOCUMENT ME!
 int getNumberOfDigits()
          DOCUMENT ME!
 java.awt.Color getPanelColor()
          DOCUMENT ME!
 java.awt.Dimension getPreferredSize()
          DOCUMENT ME!
 boolean getRaised()
          DOCUMENT ME!
 java.awt.Color getTextColor()
          DOCUMENT ME!
 int getWidth()
          DOCUMENT ME!
abstract  void paint(java.awt.Graphics g)
          DOCUMENT ME!
 void renderDigits()
          DOCUMENT ME!
 void setCaption(java.lang.String caption)
          DOCUMENT ME!
 void setCaptionAtBottom(boolean captionAtBottom)
          DOCUMENT ME!
 void setFont(java.awt.Font font)
          DOCUMENT ME!
 void setFontName(java.lang.String fontName)
          DOCUMENT ME!
 void setFontSize(int fontSize)
          DOCUMENT ME!
 void setFontStyle(int fontStyle)
          DOCUMENT ME!
 void setHeight(int height)
          DOCUMENT ME!
 void setLEDBGColor(java.awt.Color ledBGColor)
          DOCUMENT ME!
 void setLEDColor(java.awt.Color ledOnColor)
          DOCUMENT ME!
 void setNumberOfDigits(int numberOfDigits)
          DOCUMENT ME!
 void setPanelColor(java.awt.Color panelColor)
          DOCUMENT ME!
 void setRaised(boolean raised)
          DOCUMENT ME!
 void setTextColor(java.awt.Color textColor)
          DOCUMENT ME!
 void setWidth(int width)
          DOCUMENT ME!
protected  void sizeToFit()
          DOCUMENT ME!
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XPAD

public static final int XPAD
DOCUMENT ME!

See Also:
Constant Field Values

YPAD

public static final int YPAD
DOCUMENT ME!

See Also:
Constant Field Values

MINUSSIGNHEIGHT

public static final int MINUSSIGNHEIGHT
DOCUMENT ME!

See Also:
Constant Field Values

SEPARATORWIDTHPERCENT

public static final double SEPARATORWIDTHPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULTPANELCOLOR

public static final java.awt.Color DEFAULTPANELCOLOR
DOCUMENT ME!


DEFAULTTEXTCOLOR

public static final java.awt.Color DEFAULTTEXTCOLOR
DOCUMENT ME!


DEFAULTLEDCOLOR

public static final java.awt.Color DEFAULTLEDCOLOR
DOCUMENT ME!


DEFAULTLEDBGCOLOR

public static final java.awt.Color DEFAULTLEDBGCOLOR
DOCUMENT ME!


DEFAULTFONTNAME

public static final java.lang.String DEFAULTFONTNAME
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULTFONTSTYLE

public static final int DEFAULTFONTSTYLE
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULTFONTSIZE

public static final int DEFAULTFONTSIZE
DOCUMENT ME!

See Also:
Constant Field Values

width

protected int width
DOCUMENT ME!


height

protected int height
DOCUMENT ME!


digitWidth

protected int digitWidth
DOCUMENT ME!


digitHeight

protected int digitHeight
DOCUMENT ME!


separatorWidth

protected int separatorWidth
DOCUMENT ME!


numberOfDigits

protected int numberOfDigits
DOCUMENT ME!


separatorMode

protected int separatorMode
DOCUMENT ME!


raised

protected boolean raised
DOCUMENT ME!


ledOnColor

protected java.awt.Color ledOnColor
DOCUMENT ME!


ledOffColor

protected java.awt.Color ledOffColor
DOCUMENT ME!


ledBGColor

protected java.awt.Color ledBGColor
DOCUMENT ME!


panelColor

protected java.awt.Color panelColor
DOCUMENT ME!


textColor

protected java.awt.Color textColor
DOCUMENT ME!


fontName

protected java.lang.String fontName
DOCUMENT ME!


fontStyle

protected int fontStyle
DOCUMENT ME!


fontSize

protected int fontSize
DOCUMENT ME!


font

protected java.awt.Font font
DOCUMENT ME!


caption

protected java.lang.String caption
DOCUMENT ME!


captionAtBottom

protected boolean captionAtBottom
DOCUMENT ME!


digitImages

protected java.awt.Image[] digitImages
DOCUMENT ME!


digitsValid

protected boolean digitsValid
DOCUMENT ME!

Constructor Detail

LEDDisplayBase

public LEDDisplayBase(int width,
                      int height,
                      int numberOfDigits,
                      boolean raised,
                      java.lang.String fontName,
                      int fontStyle,
                      int fontSize,
                      java.lang.String caption,
                      boolean captionAtBottom,
                      java.awt.Color panelColor,
                      java.awt.Color ledColor,
                      java.awt.Color ledBGColor,
                      java.awt.Color textColor)
Creates a new LEDDisplayBase object.

Parameters:
width - DOCUMENT ME!
height - DOCUMENT ME!
numberOfDigits - DOCUMENT ME!
raised - DOCUMENT ME!
fontName - DOCUMENT ME!
fontStyle - DOCUMENT ME!
fontSize - DOCUMENT ME!
caption - DOCUMENT ME!
captionAtBottom - DOCUMENT ME!
panelColor - DOCUMENT ME!
ledColor - DOCUMENT ME!
ledBGColor - DOCUMENT ME!
textColor - DOCUMENT ME!
Method Detail

paint

public abstract void paint(java.awt.Graphics g)
DOCUMENT ME!

Overrides:
paint in class java.awt.Canvas
Parameters:
g - DOCUMENT ME!

sizeToFit

protected void sizeToFit()
DOCUMENT ME!


getPreferredSize

public java.awt.Dimension getPreferredSize()
DOCUMENT ME!

Overrides:
getPreferredSize in class java.awt.Component
Returns:
DOCUMENT ME!

renderDigits

public void renderDigits()
DOCUMENT ME!


getRaised

public boolean getRaised()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setRaised

public void setRaised(boolean raised)
DOCUMENT ME!

Parameters:
raised - DOCUMENT ME!

getWidth

public int getWidth()
DOCUMENT ME!

Overrides:
getWidth in class java.awt.Component
Returns:
DOCUMENT ME!

setWidth

public void setWidth(int width)
DOCUMENT ME!

Parameters:
width - DOCUMENT ME!

calcDisplayWidth

public int calcDisplayWidth()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getHeight

public int getHeight()
DOCUMENT ME!

Overrides:
getHeight in class java.awt.Component
Returns:
DOCUMENT ME!

setHeight

public void setHeight(int height)
DOCUMENT ME!

Parameters:
height - DOCUMENT ME!

getNumberOfDigits

public int getNumberOfDigits()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setNumberOfDigits

public void setNumberOfDigits(int numberOfDigits)
DOCUMENT ME!

Parameters:
numberOfDigits - DOCUMENT ME!

getPanelColor

public java.awt.Color getPanelColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setPanelColor

public void setPanelColor(java.awt.Color panelColor)
DOCUMENT ME!

Parameters:
panelColor - DOCUMENT ME!

getLEDColor

public java.awt.Color getLEDColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setLEDColor

public void setLEDColor(java.awt.Color ledOnColor)
DOCUMENT ME!

Parameters:
ledOnColor - DOCUMENT ME!

getLEDBGColor

public java.awt.Color getLEDBGColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setLEDBGColor

public void setLEDBGColor(java.awt.Color ledBGColor)
DOCUMENT ME!

Parameters:
ledBGColor - DOCUMENT ME!

getTextColor

public java.awt.Color getTextColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTextColor

public void setTextColor(java.awt.Color textColor)
DOCUMENT ME!

Parameters:
textColor - DOCUMENT ME!

getFont

public java.awt.Font getFont()
DOCUMENT ME!

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component
Returns:
DOCUMENT ME!

setFont

public void setFont(java.awt.Font font)
DOCUMENT ME!

Overrides:
setFont in class java.awt.Component
Parameters:
font - DOCUMENT ME!

getFontName

public java.lang.String getFontName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontName

public void setFontName(java.lang.String fontName)
DOCUMENT ME!

Parameters:
fontName - DOCUMENT ME!

getFontStyle

public int getFontStyle()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontStyle

public void setFontStyle(int fontStyle)
DOCUMENT ME!

Parameters:
fontStyle - DOCUMENT ME!

getFontSize

public int getFontSize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontSize

public void setFontSize(int fontSize)
DOCUMENT ME!

Parameters:
fontSize - DOCUMENT ME!

getCaption

public java.lang.String getCaption()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setCaption

public void setCaption(java.lang.String caption)
DOCUMENT ME!

Parameters:
caption - DOCUMENT ME!

getCaptionAtBottom

public boolean getCaptionAtBottom()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setCaptionAtBottom

public void setCaptionAtBottom(boolean captionAtBottom)
DOCUMENT ME!

Parameters:
captionAtBottom - DOCUMENT ME!