public class nUIDropdownlistEntry extends nUIEntryElement
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
items |
int |
selection |
Y_IDENTIFIER_PREV_BOTTOM
COLOR_BACKGROUND_NORMAL, COLOR_BLACK, COLOR_FOREGROUND_DARK, COLOR_FOREGROUND_LIGHT, COLOR_FOREGROUND_NORMAL, COLOR_TRANSPARENT, COLOR_WHITE, DIMENSIONS_IDENTIFIER_PARENT_DIMENSIONS
event_listener, event_listener_exclusive, first_child, last_child, next_sibling, nuiid, parent, prev_sibling, unlink_children_on_removal_from_parent
Constructor and Description |
---|
nUIDropdownlistEntry(int nuiid,
java.lang.String[] items)
Dropdown list constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getItems() |
int |
getSelection() |
java.lang.String |
getText()
Gets the text of the currently selected item.
|
void |
setEditing(boolean editing) |
void |
setItems(java.lang.String[] items)
Sets the array of Strings to display in this Dropdownlist.
|
void |
setSelection(int selection)
Sets the index of the item to display from the items array
|
getEditable, getFontSize, getFontStyle, getFormat, getHintText, getLines, getTextColor, setEditable, setFontSize, setFontSizeAbsolute, setFontSizeRelative, setFontStyle, setFormat, setHintText, setLines, setText, setTextColor
getY, insertAt
getBottom, getFocus, getFocusable, getGesturable, getHeight, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, getX, insertAtInternal, remove, setBottom, setChildFocus, setFocus, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace
public nUIDropdownlistEntry(int nuiid, java.lang.String[] items)
nuiid
- Unique Native UI ID (or -1 if unidentified)items
- Array of String items to choose frompublic java.lang.String getText()
getText
in class nUIEntryElement
public void setItems(java.lang.String[] items)
items
- Array of String objects to displayjava.lang.NullPointerException
- if items is nulljava.lang.IllegalArgumentException
- is items.length is 0public java.lang.String[] getItems()
public void setSelection(int selection)
selection
- The index into the items arrayjava.lang.NullPointerException
- if items has not been setjava.lang.ArrayIndexOutOfBoundsException
- is selection is less than 0 or greater than or equal to the size of the items arraypublic int getSelection()
public void setEditing(boolean editing)
setEditing
in class nUIEntryElement