public class nUIDropdownlistEntry extends nUIEntryElement implements IDropdownlistEntry
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
items |
int |
selection |
FORMAT_NUMBER_ANY, FORMAT_PIN_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
Constructor and Description |
---|
nUIDropdownlistEntry() |
nUIDropdownlistEntry(java.util.Hashtable properties) |
nUIDropdownlistEntry(java.lang.String[] items)
Dropdown list constructor.
|
nUIDropdownlistEntry(java.lang.String[] items,
java.util.Hashtable properties) |
Modifier and Type | Method and Description |
---|---|
int |
getHAlign()
Gets the text's horizontal alignment.
|
int |
getIndicatorColor()
Get the currently set indicator color, or 0 if it is unset.
|
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 |
setIndicatorColor(int color)
Set the color of any additional indicator(s) that denotes this as a drop-down list (e.g.
|
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
|
getFontStyle, getFormat, getHintText, getHintTextColor, getLines, getTextColor, isGrowingOnTextEntry, setFontSize, setFontStyle, setFormat, setGrowingOnTextEntry, setHintText, setHintTextColor, setLines, setText, setTextColor
applyBackground, applyBackground, applyBackground
getBackgroundDrawable, getBottom, getElementIdentifier, getFocusable, getGesturable, getHeight, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getProperties, getProperty, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, getX, getY, insertAtInternal, isEnabled, isVisible, onRemoved, remove, setBackgroundDrawable, setBottom, setElementIdentifier, setEnabled, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setProperties, setProperty, setRight, setTop, setTriggerable, setVisible, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, getFirstChild, getId, getLastChild, getNextSibling, getParent, getPrevSibling, getTag, insertAfter, insertAt, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setId, setTag, setUnlinkChildrenOnRemoval
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setBackgroundDrawable
public nUIDropdownlistEntry()
public nUIDropdownlistEntry(java.lang.String[] items)
items
- Array of String items to choose frompublic nUIDropdownlistEntry(java.util.Hashtable properties)
public nUIDropdownlistEntry(java.lang.String[] items, java.util.Hashtable properties)
public 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()
public void setIndicatorColor(int color)
color
- an AARRGGBB color.public int getIndicatorColor()