|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
org.formaria.awt.Keypad
public class Keypad
An KeyPad component is a visual representation of a numeric keypad.
Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.6 $
| Nested Class Summary |
|---|
| 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 int |
borderHeight
|
protected int |
borderWidth
|
protected ClickListener |
clickListener
|
protected int |
keyHeight
|
protected int |
keyWidth
|
protected StyleManager |
styleManager
|
| 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 | |
|---|---|
Keypad()
Constructor for a new Keypad. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the output value. |
int |
findCurrentResponse(int x,
int y)
Find the response corresponding to the current point |
java.awt.Color |
getColor(int idx,
int callerClassId)
Gets an indexed color. |
java.lang.String |
getStyle3D()
Get the style asociated with three dimensional objects/elements |
java.lang.String |
getStyleShade()
Get the style asociated with shaded elements |
java.lang.String |
getText()
Gets the output value |
java.lang.String |
getValue()
Gets the output value |
void |
paint(java.awt.Graphics sg)
Renders the keypad |
void |
paintStates()
Repaint the responses |
boolean |
respond()
Called by ClickListener to check if a response event should be sent to the parent form. |
void |
setMaxLength(int len)
Sets the maximum length of the output value |
void |
setMinLength(int len)
Sets the minimum length of the output value |
void |
setOutputField(TextHolder of)
Sets a text field in which to display the key value. |
boolean |
setState(int x,
int y,
int defResponse)
Find a response |
void |
setStyle(java.lang.String newStyle)
Set the style asociated with shaded elements, background and text colors |
void |
setStyle3D(java.lang.String newStyle)
Get the style asociated with three dimensional objects/elements |
void |
setStyleShade(java.lang.String newStyle)
Set the style asociated with shaded elements, frame color |
void |
setText(java.lang.String newText)
Sets the control's text. |
void |
setValue(java.lang.String newValue)
Sets the output value |
void |
update(java.awt.Graphics g)
Refresh the display |
void |
updateSelectedState()
Does nothing in this instance |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, 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, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, 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, setFont, 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 |
|---|
protected int borderHeight
protected int borderWidth
protected int keyHeight
protected int keyWidth
protected ClickListener clickListener
protected StyleManager styleManager
| Constructor Detail |
|---|
public Keypad()
| Method Detail |
|---|
public void update(java.awt.Graphics g)
update in class java.awt.Componentg - public void paint(java.awt.Graphics sg)
paint in class java.awt.Componentsg - public void paintStates()
paintStates in interface StateListener
public boolean setState(int x,
int y,
int defResponse)
setState in interface StateListenerx - the x coordinate of the mouse clicky - the y coordinate of the mouse clickdefResponse - the default response
public int findCurrentResponse(int x,
int y)
findCurrentResponse in interface StateListenerx - the x coordinate of the mouse clicky - the y coordinate of the mouse click
public void updateSelectedState()
updateSelectedState in interface StateListenerpublic boolean respond()
public java.awt.Color getColor(int idx,
int callerClassId)
idx - The index of the color to get.callerClassId - The ID of this calling class
org.formaria.miniui.Frame#X_BUTTONpublic java.lang.String getStyle3D()
public java.lang.String getStyleShade()
public void setStyle(java.lang.String newStyle)
newStyle - the style namepublic void setStyle3D(java.lang.String newStyle)
newStyle - the style namepublic void setStyleShade(java.lang.String newStyle)
newStyle - the style namepublic void setText(java.lang.String newText)
setText in interface TextHoldernewText - The new text to display.public void setOutputField(TextHolder of)
of - the output text fieldpublic void clear()
public java.lang.String getValue()
public java.lang.String getText()
getText in interface TextHolderpublic void setValue(java.lang.String newValue)
public void setMaxLength(int len)
len - the new maximum lengthpublic void setMinLength(int len)
len - the new minimum length
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||