|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
hades.models.special.TextLCDCanvas
a GUI component for a LCD dot-matrix display, with up two 2 lines of 40 chars each. The display controller always has 80 bytes of internal RAM, with additional cursor address and a 'base address' for scrolling.
The memory layout is different for one-line or two-line operation. For one-line operation, valid addresses are 0x00 .. 0x4F, with a window of 8/16/20/40 characters visible. Use the shift-display instructions to move (=scroll) the visible window. Address above 0x80 are wrapped around to the 0x .. 0x7F range, invalid address accesses are ignored and result in a warning message.
For two-line operation, valid addresses are 0x00 .. 0x27 and 0x40 .. 0x67. As in one-line mode, the display window of 8/16/20/40 characters can be moved (scrolled) by the shift instructions.
Nested Class Summary | |
protected class |
TextLCDCanvas.BlinkTimer
|
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
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 | |
TextLCDCanvas(int n_rows,
int n_cols)
|
Method Summary | |
void |
clearDisplay()
|
int |
countColums()
|
int |
countRows()
|
void |
createBlinkTimer()
|
void |
createBufferImage()
|
void |
cursorHome()
|
void |
enableCursor(boolean b)
|
void |
enableCursorBlinking(boolean b)
|
void |
enableDisplay(boolean b)
|
boolean |
getAutoRepaintEnable()
|
int |
getColumn(int address)
calculate the display column corresponding to address. |
int |
getCursorAddress()
|
int |
getDataAt(int addr)
return the internal memory data of 'addr'. |
int |
getDataAt(int row,
int column)
|
java.awt.Dimension |
getMinimumSize()
|
int |
getPixelX(int address)
|
int |
getPixelY(int address)
|
java.awt.Dimension |
getPreferredSize()
|
int |
getRow(int address)
calculate the display row (0 or 1) corresponding to address. |
void |
hideCursor(int address)
|
void |
initializeData()
|
void |
initializeHamburgData()
|
boolean |
isDoubleBuffered()
|
boolean |
isOpaque()
|
boolean |
isVisibleAddress(int address)
|
void |
loadCharacterMatrix(java.lang.String resourcename)
load the image file with the full character matrix (ROM). |
void |
loadDefaultColors()
|
static void |
main(java.lang.String[] argv)
|
void |
moveCursorLeft()
|
void |
moveCursorRight()
|
static void |
msg(java.lang.String msg)
|
void |
paintComponent(java.awt.Graphics g)
|
int |
readCGRam(int address)
|
void |
repaintAt(int address)
|
void |
rotateLeft()
|
void |
rotateRight()
|
void |
selectTwoLines(boolean b)
|
void |
selectUnderlineCursor(boolean b)
|
void |
setAutoRepaintDelay(int millis)
|
void |
setAutoRepaintEnable(boolean b)
|
void |
setBaseAddress(int address)
|
void |
setCursorAddress(int address)
|
void |
setDataAt(int address,
int value)
|
void |
setSize(int rows,
int columns)
set a new size for this LCD. |
void |
showCursor(int address)
|
void |
update(java.awt.Graphics g)
|
void |
updateBufferImage(java.awt.Graphics g)
|
void |
writeCGRam(int address,
int value)
write to character generator RAM area. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, 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 |
public TextLCDCanvas(int n_rows, int n_cols)
Method Detail |
public int countRows()
public int countColums()
public void setSize(int rows, int columns)
public void initializeData()
public void initializeHamburgData()
public void clearDisplay()
public void enableDisplay(boolean b)
public void selectTwoLines(boolean b)
public void enableCursor(boolean b)
public void selectUnderlineCursor(boolean b)
public void enableCursorBlinking(boolean b)
public void setCursorAddress(int address)
public int getCursorAddress()
public void cursorHome()
public void moveCursorLeft()
public void moveCursorRight()
public void setBaseAddress(int address)
public void rotateLeft()
public void rotateRight()
public void createBlinkTimer()
public void loadDefaultColors()
public void loadCharacterMatrix(java.lang.String resourcename)
public void createBufferImage()
public void setDataAt(int address, int value)
public int getDataAt(int addr)
public int getDataAt(int row, int column)
public int getRow(int address)
public int getColumn(int address)
Note that the resulting column may not be visible on displays smaller than 40 chars wide.
public int getPixelX(int address)
public int getPixelY(int address)
public boolean isVisibleAddress(int address)
public void update(java.awt.Graphics g)
public boolean isOpaque()
public boolean isDoubleBuffered()
public void paintComponent(java.awt.Graphics g)
public void updateBufferImage(java.awt.Graphics g)
public void repaintAt(int address)
public void hideCursor(int address)
public void showCursor(int address)
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getPreferredSize()
public boolean getAutoRepaintEnable()
public void setAutoRepaintEnable(boolean b)
public void setAutoRepaintDelay(int millis)
public void writeCGRam(int address, int value)
public int readCGRam(int address)
public static void msg(java.lang.String msg)
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |