superwaba.ext.xplat.html.ui
Class MultiListBox
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.ListBox
|
+--superwaba.ext.xplat.html.ui.ListBox
|
+--superwaba.ext.xplat.html.ui.MultiListBox
- public class MultiListBox
- extends ListBox
MultiListBox is a multiply selectable Listbox.
| Fields inherited from class waba.ui.ListBox |
btnX,
extraHorizScrollButtonHeight,
itemCount,
items,
offset,
sbar,
selectedIndex,
simpleBorder,
useFullWidthOnSelection,
visibleItems,
xOffset |
| Fields inherited from class waba.ui.Container |
BORDER_LOWERED,
BORDER_NONE,
BORDER_RAISED,
BORDER_SIMPLE,
children,
lastH,
lastW,
lastX,
lastY,
parentWindow,
started,
tabOrder,
tail |
| 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 |
MultiListBox(java.lang.String name)
Creates an empty MultiListbox. |
|
Method Summary |
void |
add(java.lang.String item,
java.lang.String key,
boolean selected)
Adds an Object to this ListBox
This is the only method that should be used for building
a ListBox. |
protected void |
drawCursor(Graphics g,
int sel,
boolean on)
This method is used to draw the cursor around the desired item |
java.lang.String |
getValue()
Get the value hold by this Controllable |
void |
onEvent(Event event)
Called to process key, pen, control and other posted events. |
void |
onPaint(Graphics g)
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.
|
void |
reset()
Resets the control to its original default value. |
void |
select(int index)
Select the given index and scroll to it if necessary. |
| Methods inherited from class waba.ui.ListBox |
add,
add,
add,
clear,
drawItem,
enableHorizScroll,
find,
getItemAt,
getItems,
getItemWidth,
getPreferredHeight,
getPreferredWidth,
getSelectedIndex,
getSelectedItem,
indexOf,
insert,
onBoundsChanged,
onColorsChanged,
qsort,
remove,
remove,
removeAll,
select,
selectLast,
setCursorColor,
setEnabled,
setItemAt,
setSimpleBorder,
size |
| Methods inherited from class waba.ui.Container |
add,
add,
broadcastEvent,
findChild,
getChildren,
getClientRect,
getClientRect,
onAdd,
onRemove,
onStart,
paintChildren,
setBorderStyle,
setHighlighting,
swapToTopmostWindow |
| Methods inherited from class waba.ui.Control |
addTimer,
changeHighlighted,
contains,
createGraphics,
drawHighlight,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getRect,
getSize,
isDisplayed,
isEnabled,
isVisible,
onFontChanged,
onWindowPaintFinished,
postEvent,
removeTimer,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
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 |
MultiListBox
public MultiListBox(java.lang.String name)
- Creates an empty MultiListbox.
- Parameters:
name - Name of this Controllable
add
public void add(java.lang.String item,
java.lang.String key,
boolean selected)
- Description copied from class: ListBox
- Adds an Object to this ListBox
This is the only method that should be used for building
a ListBox.
- Overrides:
- add in class ListBox
- Tags copied from class: ListBox
- Parameters:
item - String to addkey - Associated keyselected - true if this Object is selected by default
select
public void select(int index)
- Description copied from class: ListBox
- Select the given index and scroll to it if necessary. Note: select must be called only after the control has been added to the container and its rect has been set.
- Overrides:
- select in class ListBox
drawCursor
protected void drawCursor(Graphics g,
int sel,
boolean on)
- Description copied from class: ListBox
- This method is used to draw the cursor around the desired item
- Overrides:
- drawCursor in class ListBox
onEvent
public void onEvent(Event event)
- Description copied from interface: Controllable
- Called to process key, pen, control and other posted events.
- Overrides:
- onEvent in class ListBox
- Tags copied from interface: Controllable
- Parameters:
event - the event to process
onPaint
public void onPaint(Graphics g)
- Description copied from interface: Controllable
- 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 ListBox
- Tags copied from interface: Controllable
- Parameters:
g - the graphics object for drawing
getValue
public java.lang.String getValue()
- Description copied from interface: Controllable
- Get the value hold by this Controllable
- Overrides:
- getValue in class ListBox
- Tags copied from interface: Controllable
- Returns:
- the value hold by this Controllable
reset
public void reset()
- Description copied from interface: Controllable
- Resets the control to its original default value.
- Overrides:
- reset in class ListBox