1.0.0

org.eclipse.soda.dk.matrix.lcd.simulator.view
Class LcdDisplayPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by org.eclipse.soda.dk.matrix.lcd.simulator.view.AbstractPanelWithBackground
                  extended by org.eclipse.soda.dk.matrix.lcd.simulator.view.LcdDisplayPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, Constants, LcdDisplayPanelConstants

public class LcdDisplayPanel
extends AbstractPanelWithBackground
implements LcdDisplayPanelConstants

Version:
1.0.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.eclipse.soda.dk.matrix.lcd.simulator.view.interfaces.LcdDisplayPanelConstants
DEFAULT_BUFFER_CONTENTS, DISPLAY_SIZE, EMPTY_BUFFER_CONTENTS, L1_END_INDEX, L1_START_INDEX, L1H, L1W, L1X, L1Y, L2_END_INDEX, L2_START_INDEX, L2H, L2W, L2X, L2Y, LCD_HEIGHT, LCD_LIT_COLOR, LCD_UNLIT_COLOR, LCD_WIDTH, MONO, OFF_SRC, ON_SRC
 
Fields inherited from interface org.eclipse.soda.dk.matrix.lcd.simulator.view.interfaces.Constants
IMGROOT, PANEL_HEIGHT, PANEL_WIDTH, WORKING_DIR
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LcdDisplayPanel()
          Constructs an instance of this class.
 
Method Summary
 void clearText()
          Clear text.
 void decrementCursorPosition()
          Decrement cursor position.
protected  java.awt.Image getBacklightOffImage()
          Gets the backlight off image (Image) value.
protected  java.awt.Image getBacklightOnImage()
          Gets the backlight on image (Image) value.
protected  java.lang.StringBuffer getBuffer()
          Gets the buffer (StringBuffer) value.
protected  int getCursorPosition()
          Gets the cursor position (int) value.
 void incrementCursorPosition()
          Increment cursor position.
protected  void initialize()
          Initialize.
protected  boolean isPrintableCharacter(byte c)
          Is printable character with the specified c parameter and return the boolean result.
protected  void populate()
          Populate.
protected  void populateLabels()
          Populate labels.
 void printCharacter(byte charToPrint)
          Print character with the specified char to print parameter.
protected  void printCharacter(byte charToPrint, boolean refresh)
          Print character with the specified char to print and refresh parameters.
 void printString(java.lang.String string)
          Print string with the specified string parameter.
 void sendCursorToPosition(int x, int y)
          Send cursor to position with the specified x and y parameters.
protected  void setBacklightOffImage(java.awt.Image image)
          Sets the backlight off image value.
protected  void setBacklightOnImage(java.awt.Image image)
          Sets the backlight on image value.
protected  void setBuffer(java.lang.StringBuffer bs)
          Sets the buffer value.
protected  void setBufferContents(java.lang.StringBuffer bs)
          Sets the buffer contents value.
protected  void setCursorPosition(int i)
          Sets the cursor position value.
 void showDefaultText()
          Show default text.
 void turnOffBacklight()
          Turn off backlight.
 void turnOnBacklight()
          Turn on backlight.
 
Methods inherited from class org.eclipse.soda.dk.matrix.lcd.simulator.view.AbstractPanelWithBackground
getCurrentImage, loadImage, paint, refresh, setCurrentImage
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LcdDisplayPanel

public LcdDisplayPanel()
Constructs an instance of this class.

Method Detail

clearText

public void clearText()
Clear text.

See Also:
showDefaultText()

decrementCursorPosition

public void decrementCursorPosition()
Decrement cursor position.

See Also:
getCursorPosition(), incrementCursorPosition(), setCursorPosition(int)

getBacklightOffImage

protected java.awt.Image getBacklightOffImage()
Gets the backlight off image (Image) value.

Returns:
The backlight off image (Image) value.
See Also:
setBacklightOffImage(Image)

getBacklightOnImage

protected java.awt.Image getBacklightOnImage()
Gets the backlight on image (Image) value.

Returns:
The backlight on image (Image) value.
See Also:
setBacklightOnImage(Image)

getBuffer

protected java.lang.StringBuffer getBuffer()
Gets the buffer (StringBuffer) value.

Returns:
The buffer (StringBuffer) value.
See Also:
setBuffer(StringBuffer)

getCursorPosition

protected int getCursorPosition()
Gets the cursor position (int) value.

Returns:
The cursor position (int) value.
See Also:
decrementCursorPosition(), incrementCursorPosition(), setCursorPosition(int)

incrementCursorPosition

public void incrementCursorPosition()
Increment cursor position.

See Also:
decrementCursorPosition(), getCursorPosition(), setCursorPosition(int)

initialize

protected void initialize()
Initialize.


isPrintableCharacter

protected boolean isPrintableCharacter(byte c)
Is printable character with the specified c parameter and return the boolean result.

Parameters:
c - The c (byte) parameter.
Returns:
Results of the is printable character (boolean) value.

populate

protected void populate()
Populate.


populateLabels

protected void populateLabels()
Populate labels.


printCharacter

public void printCharacter(byte charToPrint)
Print character with the specified char to print parameter.

Parameters:
charToPrint - The char to print (byte) parameter.
See Also:
isPrintableCharacter(byte), printCharacter(byte,boolean)

printCharacter

protected void printCharacter(byte charToPrint,
                              boolean refresh)
Print character with the specified char to print and refresh parameters.

Parameters:
charToPrint - The char to print (byte) parameter.
refresh - The refresh (boolean) parameter.
See Also:
isPrintableCharacter(byte), printCharacter(byte)

printString

public void printString(java.lang.String string)
Print string with the specified string parameter.

Parameters:
string - The string (String) parameter.

sendCursorToPosition

public void sendCursorToPosition(int x,
                                 int y)
Send cursor to position with the specified x and y parameters.

Parameters:
x - The x (int) parameter.
y - The y (int) parameter.

setBacklightOffImage

protected void setBacklightOffImage(java.awt.Image image)
Sets the backlight off image value.

Parameters:
image - The image (Image) parameter.
See Also:
getBacklightOffImage()

setBacklightOnImage

protected void setBacklightOnImage(java.awt.Image image)
Sets the backlight on image value.

Parameters:
image - The image (Image) parameter.
See Also:
getBacklightOnImage()

setBuffer

protected void setBuffer(java.lang.StringBuffer bs)
Sets the buffer value.

Parameters:
bs - The bs (StringBuffer) parameter.
See Also:
getBuffer()

setBufferContents

protected void setBufferContents(java.lang.StringBuffer bs)
Sets the buffer contents value.

Parameters:
bs - The bs (StringBuffer) parameter.

setCursorPosition

protected void setCursorPosition(int i)
Sets the cursor position value.

Parameters:
i - The i (int) parameter.
See Also:
decrementCursorPosition(), getCursorPosition(), incrementCursorPosition()

showDefaultText

public void showDefaultText()
Show default text.


turnOffBacklight

public void turnOffBacklight()
Turn off backlight.


turnOnBacklight

public void turnOnBacklight()
Turn on backlight.


1.0.0

Copyright (c) 2007 IBM