|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--brf.j2me.dynaworks.ui.BasicWidget
|
+--brf.j2me.dynaworks.ui.ComboBox
Custom user control widget for a combobox.
BasicWidget,
UserWidget| Field Summary | |
private boolean |
expanded
selection list visible? |
private int |
he
height of expanded selection. |
private int |
idx
index of selected entry. |
private ListBox |
lb
associated listbox. |
private static Bitmap |
select
Bitmap "select" |
private java.lang.String |
text
Label of the combobox. |
private int |
ye
y-position for expanded selection. |
| Fields inherited from class brf.j2me.dynaworks.ui.BasicWidget |
g, h, w, x, y |
| Constructor Summary | |
ComboBox(int x,
int y,
int w,
int exp)
constructor. |
|
| Method Summary | |
(package private) static void |
|
void |
addItem(ListItem item)
Inserts the item for selection. |
boolean |
contains(int xc,
int yc)
check if point is inside the widget |
int |
getSelection()
get the index of the currently selected entry. |
java.lang.String |
getSelectionText()
get the text of the currently selected entry. |
ActionEvent |
handleKeyDown(int keyCode)
Handle a "keyDown" event. |
ActionEvent |
handlePenDown(int xc,
int yc)
Handle a "pen down" event. |
ActionEvent |
handlePenMove(int xc,
int yc)
Handle a "pen move" event. |
ActionEvent |
handlePenUp(int xc,
int yc)
Handle a "pen up" event. |
void |
paint()
Paint the user control. |
void |
removeAll()
deletes all items from the selection list. |
boolean |
removeItem(ListItem item)
Deletes the item from the selection list. |
void |
selectItem(ListItem item,
boolean redraw)
selects the item. |
void |
setExpanded(boolean mode)
set the expanded mode of the combobox. |
| Methods inherited from class brf.j2me.dynaworks.ui.BasicWidget |
handleSysKeyDown, hasFocus, loseFocus, setFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
private int ye
private int he
private boolean expanded
private ListBox lb
private java.lang.String text
private int idx
private static Bitmap select
| Constructor Detail |
public ComboBox(int x,
int y,
int w,
int exp)
x - int - x coordinate of upper-left corner.y - int - y coordinate of upper-left corner.w - int - width of control.exp - int - height of control when expanded.| Method Detail |
static void()
public boolean contains(int xc,
int yc)
contains in class BasicWidgetxc - int - x coordinate of check point.yc - int - y coordinate of check point.public void addItem(ListItem item)
item - ListItem - item to be inserted.public boolean removeItem(ListItem item)
item - ListItem - item to be removedpublic void removeAll()
public void selectItem(ListItem item,
boolean redraw)
item - ListItem - item to be selectedpublic int getSelection()
public java.lang.String getSelectionText()
public void setExpanded(boolean mode)
mode - boolean - new expanded mode.
public ActionEvent handlePenDown(int xc,
int yc)
handlePenDown in class BasicWidgetxc - int - x coordinate of hit point.yc - int - y coordinate of hit point.ActionEvent
public ActionEvent handlePenMove(int xc,
int yc)
handlePenMove in class BasicWidgetxc - int - x coordinate of pen point.yc - int - y coordinate of pen point.ActionEvent
public ActionEvent handlePenUp(int xc,
int yc)
handlePenUp in class BasicWidgetxc - int - x coordinate of pen point.yc - int - y coordinate of pen point.ActionEventpublic ActionEvent handleKeyDown(int keyCode)
handleKeyDown in class BasicWidgetkey - int - key send to the control.ActionEventpublic void paint()
paint in class BasicWidget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||