public class nUIDropdownlistEntry extends nUIEntryElement
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
items |
int |
selection |
FORMAT_NUMBER_ANY, FORMAT_NUMBER_HIDDEN, FORMAT_STRING_ANY, FORMAT_STRING_HIDDEN
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 |
---|---|
int |
getHAlign()
Gets the text's horizontal alignment.
|
java.lang.String[] |
getItems() |
int |
getSelection() |
java.lang.String |
getText()
Gets the text of the currently selected item.
|
void |
setEditing(boolean editing) |
void |
setHAlign(int halign)
Sets the alignment of the text.
|
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, setFormat, setHintText, setLines, setText, setTextColor
getY, insertAt
getBackgroundDrawable, getBgcolor, getBottom, getFocus, getFocusable, getGesturable, getHeight, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, getX, insertAtInternal, isEnabled, onRemoved, remove, setBackgroundDrawable, setBgcolor, setBottom, setChildFocus, setEnabled, setFocus, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, getTag, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setTag
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.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
public void setHAlign(int halign)
halign
- One of nUIConstrants.left, .center or .rightjava.lang.IllegalArgumentException
- if halign is not validpublic int getHAlign()