superwaba.ext.xplat.ui
Class SpinList
java.lang.Object
|
+--waba.ui.Control
|
+--superwaba.ext.xplat.ui.SpinList
- public class SpinList
- extends Control
Creates a control with two arrows, so you can scroll values and show
the current one.
It supports auto-scroll (by clicking and holding) and can also parse parameters.
For example, passing "Day [1,31]" will create an array of "Day 1","Day 2",...,"Day 31".
| Fields inherited from class waba.ui.Control |
AFTER,
appId,
appObj,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
clearValueInt,
clearValueStr,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
focusTraversable,
font,
foreColor,
foreDis,
height,
highlightRectsCount,
isHighlighting,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
uiCE,
uiFlat,
uiPalm,
uiVista,
visible,
width,
x,
x2,
y,
y2 |
|
Constructor Summary |
SpinList(java.lang.String[] choices,
int selected)
|
| Methods inherited from class waba.ui.Control |
addTimer,
changeHighlighted,
contains,
createGraphics,
drawHighlight,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getPreferredHeight,
getRect,
getSize,
isDisplayed,
isEnabled,
isVisible,
onBoundsChanged,
onColorsChanged,
onFontChanged,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setEnabled,
setFocusLess,
setFont,
setForeColor,
setRect,
setRect,
setRect,
setVisible,
translateFromOrigin,
uiStyleChanged |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
timerInterval
public int timerInterval
SpinList
public SpinList(java.lang.String[] choices,
int selected)
getPreferredWidth
public int getPreferredWidth()
- Description copied from class: Control
- Returns the preffered width of this control.
- Overrides:
- getPreferredWidth in class Control
setChoices
public void setChoices(java.lang.String[] choices)
getChoices
public java.lang.String[] getChoices()
getSelected
public java.lang.String getSelected()
getSelectedIndex
public int getSelectedIndex()
setSelectedIndex
public void setSelectedIndex(int i)
removeAt
public java.lang.String removeAt(int index)
removeCurrent
public java.lang.String removeCurrent()
compareTo
public int compareTo(java.lang.String s1,
java.lang.String s2)
indexOf
public int indexOf(java.lang.String elem)
insertInOrder
public void insertInOrder(java.lang.String elem)
onPaint
public void onPaint(Graphics g)
- Description copied from class: Control
- Called to draw the control. When this method is called, the graphics
object passed has been translated into the coordinate system of the
control and the area behind the control has
already been painted. The background is painted by the top-level
window control.
- Overrides:
- onPaint in class Control
- Tags copied from class: Control
- Parameters:
g - the graphics object for drawing- See Also:
Graphics
onEvent
public void onEvent(Event event)
- Description copied from class: Control
- Called to process key, pen, control and other posted events.
- Overrides:
- onEvent in class Control
- Tags copied from class: Control
- Parameters:
event - the event to process- See Also:
Event,
KeyEvent,
PenEvent
clear
public void clear()
- Clears this control, selecting element 0.
- Overrides:
- clear in class Control