|
|||||||||
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 | |
boolean |
fullHeight
if set to true, the popup window will have the height of the screen |
Fields inherited from class waba.ui.Container |
BORDER_LOWERED,
BORDER_NONE,
BORDER_RAISED,
BORDER_SIMPLE,
children,
lastH,
lastW,
lastX,
lastY,
parentWindow,
tail |
Fields inherited from class waba.ui.Control |
AFTER,
appId,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
font,
foreColor,
foreDis,
height,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
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(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(Object item)
Adds an Object to the Listbox |
void |
add(Object[] items)
Adds an array of Objects to the Listbox |
Object |
getItemAt(int i)
Get the Object at the given Index |
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 |
Object |
getSelectedItem()
Returns the selected item of the PopList |
int |
indexOf(Object name)
Returns the index of the item specified by the name |
void |
insert(Object item,
int index)
Adds an Object to the Listbox at the given index |
protected void |
onBoundsChanged()
Called after an 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(Object item)
Removes an Object from the Listbox |
void |
removeAll()
Empties the ListBox |
void |
select(int i)
Select an item |
void |
setCursorColor(Color color)
Sets the cursor color for this ComboBox. |
void |
setItemAt(int i,
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,
onStart,
paintChildren,
setBorderStyle,
setEnabled |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
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 |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Field Detail |
public boolean fullHeight
Constructor Detail |
public ComboBox()
public ComboBox(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(Object[] items)
public void add(Object item)
public void insert(Object item, int index)
public void removeAll()
public void remove(Object item)
public void remove(int itemIndex)
public void setItemAt(int i, Object s)
public Object getItemAt(int i)
public Object getSelectedItem()
public int getSelectedIndex()
public Object[] getItems()
public int indexOf(Object name)
public void setCursorColor(Color color)
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
,
PenEvent
public void popupPop()
protected void onColorsChanged(boolean colorsChanged)
public void onPaint(Graphics g)
g
- the graphics object for drawingGraphics
public void qsort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |