|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.ComboBox
ComboBox is a simple implementation of a ComboBox.
Note: the color used in the setBackground method will be used in the button only. The background color of the control will be a lighter version of the given color.
| Field Summary | |
static int |
extraArrowSize
You can increase the size of the arrow by changing this value to something else, before calling the constructor of the ScrollBar. |
boolean |
fullHeight
if set to true, the popup window will have the height of the screen |
boolean |
fullWidth
if set to true, the popup window will have the width of the screen |
protected PopList |
pop
|
| 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 | |
ComboBox()
Creates an empty ComboBox |
|
ComboBox(ListBox userListBox)
Creates a ComboBox with a PopList containing the given ListBox. |
|
ComboBox(java.lang.Object[] items)
Creates a ComboBox with the given items |
|
ComboBox(PopList userPopList)
Constructs a ComboBox with the given PopList. |
|
| Method Summary | |
void |
add(Control control)
do nothing |
void |
add(java.lang.Object item)
Adds an Object to the Listbox. |
void |
add(java.lang.Object[] items)
Adds an array of Objects to the Listbox |
void |
clear()
Clears this control, selecting index clearValueInt. |
void |
enableHorizScroll()
Adds support for horizontal scroll on this listbox. |
java.lang.Object |
getItemAt(int i)
Get the Object at the given Index |
java.lang.Object[] |
getItems()
Returns all items in this ComboBox |
int |
getPreferredHeight()
Returns the preffered height of this control. |
int |
getPreferredWidth()
Returns the preffered width of this control. |
int |
getSelectedIndex()
Returns the position of the selected item of the PopList |
java.lang.Object |
getSelectedItem()
Returns the selected item of the PopList |
int |
indexOf(java.lang.Object name)
Returns the index of the item specified by the name |
void |
insert(java.lang.Object item,
int index)
Adds an Object to the Listbox at the given index |
protected void |
onBoundsChanged()
Called after a setRect. |
protected void |
onColorsChanged(boolean colorsChanged)
Called after a setEnabled, setForeColor and setBackColor and when a control has been added to a Container. |
void |
onEvent(Event event)
Called to process key, pen, control and other posted events. |
protected void |
onFontChanged()
passes the font to the pop list |
void |
onPaint(Graphics g)
paint the combo's border and the current selected item |
void |
popupPop()
Pops up the combobox |
void |
qsort()
Sorts the items of this combobox |
void |
remove(Control control)
do nothing |
void |
remove(int itemIndex)
Removes an Object from the Listbox |
void |
remove(java.lang.Object item)
Removes an Object from the Listbox |
void |
removeAll()
Empties the ListBox |
void |
select(int i)
Select the given index. |
void |
select(java.lang.Object name)
Selects an item. |
void |
selectLast()
Selects the last item added to this combobox, doing a scroll if needed. |
void |
setCursorColor(Color color)
Sets the cursor color for this ComboBox. |
void |
setItemAt(int i,
java.lang.Object s)
Sets the Object at the given Index, starting from 0 |
int |
size()
Returns the number of items |
| Methods inherited from class waba.ui.Container |
add,
add,
broadcastEvent,
findChild,
getChildren,
getClientRect,
getClientRect,
onAdd,
onRemove,
onStart,
paintChildren,
setBorderStyle,
setEnabled,
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,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
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 |
| Field Detail |
protected PopList pop
public boolean fullHeight
public boolean fullWidth
public static int extraArrowSize
| Constructor Detail |
public ComboBox()
public ComboBox(java.lang.Object[] items)
public ComboBox(ListBox userListBox)
public ComboBox(PopList userPopList)
| Method Detail |
public void add(Control control)
public void remove(Control control)
public void add(java.lang.Object[] items)
public void add(java.lang.Object item)
add(Object[]) to add a bunch of objects instead.
public void insert(java.lang.Object item,
int index)
public void removeAll()
public void remove(java.lang.Object item)
public void remove(int itemIndex)
public void setItemAt(int i,
java.lang.Object s)
public java.lang.Object getItemAt(int i)
public java.lang.Object getSelectedItem()
public int getSelectedIndex()
public java.lang.Object[] getItems()
public int indexOf(java.lang.Object name)
public void setCursorColor(Color color)
public void select(java.lang.Object name)
public void select(int i)
public int size()
public int getPreferredWidth()
public int getPreferredHeight()
protected void onFontChanged()
protected void onBoundsChanged()
public void onEvent(Event event)
event - the event to processEvent,
KeyEvent,
PenEventpublic void popupPop()
protected void onColorsChanged(boolean colorsChanged)
public void onPaint(Graphics g)
g - the graphics object for drawingGraphicspublic void qsort()
public void enableHorizScroll()
public void selectLast()
public void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||