|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.ControlBase
ewe.ui.Control
ewe.ui.UpDownInput
An UpDownInput is generally used within groups within a single popup-window. This is because the Up/Down cursor keys will change the input value instead of moving from control to control. The Left/Right keys are will be used to go from one control to the next. The Back key is used to abort the entire input and the Action key is used to accept the entire input.
You would usually override the changeToNext() method to cycle through the values but you can either set the textValues Vector to specify a fixed set of text values, or set the integerValues Range to specify a range of allowed integer values.
| Field Summary | |
boolean |
allowNumericInput
Set this false to disallow numeric input. |
int |
anchor
|
boolean |
autoAdvance
This is true by default and is used with the integerDigits value to allow the focus to move to the next field when the full number of digits for this field has been entered. |
static int |
CHANGE_BY_KEYBOARD
|
static int |
CHANGE_DONT_FLASH
|
static int |
CHANGE_DOWN
|
static int |
CHANGE_OPTIONS_MASK
|
static int |
CHANGE_TYPE_MASK
|
static int |
CHANGE_UP
|
boolean |
dataChangeOnEachPress
This is false by default, and if it is set true then a DataChange event will be sent everytime the value changes instead of only when it loses focus (which is the default mode of operation). |
Color |
focusedColor
|
boolean |
hasSplit
Show the horizontal split line. |
int |
integerDigits
If you are using this for integer input, this specifies the number of digits that will be input/displayed. |
Range |
integerValues
If this is not null it will indicate a range of allowable integer values. |
Vector |
textValues
If this is not null it will indicate a set of allowable text values. |
static int |
VALIDATE_ACTION
|
static int |
VALIDATE_DATA_ENTRY
|
static int |
VALIDATE_LOSING_FOCUS
|
boolean |
wrapAround
This is true by default - if it is false the data will not wrap around. |
boolean |
zeroFillInteger
If you are using this for integer input, this specifies whether zeros should be placed in front of integer values - it is false by default. |
boolean |
zeroIndexedText
This is false by default and if this is true then, when using the textValues Vector to list the allowable text values, this indicates that the list of values should be zero-based indexed, otherwise it will be 1-based index (ie 1 represents the first item, instead of 0 representing the first item). |
| Fields inherited from class ewe.ui.Control |
_debug, backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, DoPaintMethod, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, foreGround, haveNativePaint, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, MyClass, name, next, np, parent, penStatus, popupSound, popupSoundClip, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, standardBorder, standardEdge, startDragResolution, tags, tail, text, toolTip, width, x, y |
| Fields inherited from class ewe.ui.ControlBase |
clipItems, clipObject, clipOwner, curPoint, currentPenEvent, debugControl, debugFlag, DidHoldDown, doubleBuffer, doubleClickTime, firstPress, globalDrawFlat, globalEditable, globalEnabled, globalPalmStyle, globalSmallControls, GotPenDown, PenIsOn, pressPoint, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput |
| Fields inherited from interface ewe.ui.UIConstants |
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN |
| Fields inherited from interface ewe.ui.CellConstants |
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST |
| Fields inherited from interface ewe.ui.ControlConstants |
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown |
| Fields inherited from interface ewe.fx.ImageRefresher |
KEEP_VISIBLE |
| Constructor Summary | |
UpDownInput(int columns)
Create an UpDownInput that is a specific number of columns wide. |
|
| Method Summary | |
protected boolean |
changeToNext(int changeType)
This is called to change the value. |
void |
changeValue(int changeType)
This is called when the user presses Up or Down but can also be called programmatically. |
void |
doPaint(Graphics g,
Rect area)
|
int |
getInt()
Return the integer value in the control - by default it simply converts the text value to an integer. |
void |
gotFocus(int how)
|
boolean |
hasChangedSinceGotFocus()
This returns true if the value represented by the Control has changed since it got the focus. |
void |
lostFocus(int how)
|
void |
numberKeyPressed(int digitValue)
|
void |
onKeyEvent(KeyEvent ev)
|
void |
penHeld(Point where)
Called when the Pen or Mouse button is held down on the control. |
void |
penPressed(Point where)
Called when the Pen or Mouse button is pressed on the control. |
void |
setInt(int value)
Return the integer value in the control - by default it simply converts the text value to an integer. |
protected boolean |
validateData(int how)
This is called when the control loses focus or if the action key is pressed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Field Detail |
public int anchor
public boolean hasSplit
public Range integerValues
public Vector textValues
public int integerDigits
public boolean zeroFillInteger
public boolean wrapAround
public boolean autoAdvance
public boolean allowNumericInput
public boolean zeroIndexedText
public boolean dataChangeOnEachPress
public Color focusedColor
public static final int VALIDATE_LOSING_FOCUS
public static final int VALIDATE_ACTION
public static final int VALIDATE_DATA_ENTRY
public static final int CHANGE_UP
public static final int CHANGE_DOWN
public static final int CHANGE_TYPE_MASK
public static final int CHANGE_OPTIONS_MASK
public static final int CHANGE_BY_KEYBOARD
public static final int CHANGE_DONT_FLASH
| Constructor Detail |
public UpDownInput(int columns)
| Method Detail |
public boolean hasChangedSinceGotFocus()
public void gotFocus(int how)
gotFocus in class Controlpublic void lostFocus(int how)
lostFocus in class Controlprotected boolean validateData(int how)
how - one of the VALIDATE_XXX values.
public void doPaint(Graphics g,
Rect area)
doPaint in class Controlpublic void changeValue(int changeType)
changeType - either CHANGE_UP or CHANGE_DOWN possibly ORed with CHANGE_BY_KEYBOARD
if the change was called by a key press.public int getInt()
getInt in interface Intablepublic void setInt(int value)
setInt in interface Intableprotected boolean changeToNext(int changeType)
changeType - either CHANGE_UP or CHANGE_DOWN
public void numberKeyPressed(int digitValue)
public void onKeyEvent(KeyEvent ev)
onKeyEvent in class Controlpublic void penPressed(Point where)
ControlWithin this method you can use the Control.currentPenEvent value to find out more about the PenEvent that caused this - including any modifiers (e.g. SHIFT keys) or determine if the left or right mouse button was pressed.
penPressed in class Controlwhere - The point on the Control where the pen was pressed.public void penHeld(Point where)
ControlWithin this method you can use the Control.currentPenEvent value to find out more about the PenEvent that caused this - including any modifiers (e.g. SHIFT keys) or determine if the left or right mouse button was pressed.
This method is usually used to display a context sensitive menu. In fact the default code for it is:
if (!menuIsActive()) doMenu(p);
penHeld in class Controlwhere - The point on the Control where the pen was held.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||