| Constructor and Description |
|---|
TComboBox(TWidget parent,
int x,
int y,
int width,
java.util.List<java.lang.String> values,
int valuesIndex,
int maxValuesHeight,
TAction updateAction)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw()
Draw the combobox down arrow.
|
java.util.List<java.lang.String> |
getList()
Get a copy of the list of strings to display.
|
java.lang.String |
getText()
Get combobox text value.
|
void |
hideList()
Hide the drop-down list.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse down clicks.
|
void |
setHeight(int height)
Override TWidget's height: we can only set height at construction
time.
|
void |
setIndex(int index)
Set combobox text to one of the list values.
|
void |
setList(java.util.List<java.lang.String> list)
Set the new list of strings to display.
|
void |
setText(java.lang.String text)
Set combobox text value.
|
void |
setText(java.lang.String text,
boolean caseSensitive)
Set combobox text value.
|
void |
setWidth(int width)
Override TWidget's width: we need to set child widget widths.
|
void |
showList()
Show the drop-down list.
|
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, onResize, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setLayoutManager, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXYpublic TComboBox(TWidget parent, int x, int y, int width, java.util.List<java.lang.String> values, int valuesIndex, int maxValuesHeight, TAction updateAction)
parent - parent widgetx - column relative to parenty - row relative to parentwidth - visible combobox width, including the down-arrowvalues - the possible values for the box, shown in the drop-downvaluesIndex - the initial index in values, or -1 for no default
valuemaxValuesHeight - the maximum height of the values drop-down when
it is visibleupdateAction - action to call when a new value is selected from
the list or enter is pressed in the edit fieldpublic void onMouseDown(TMouseEvent mouse)
onMouseDown in class TWidgetmouse - mouse button down eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress in class TWidgetkeypress - keystroke eventpublic void setWidth(int width)
public void setHeight(int height)
public void hideList()
public void showList()
public java.lang.String getText()
public void setText(java.lang.String text)
text - the new text in the edit fieldpublic void setText(java.lang.String text,
boolean caseSensitive)
text - the new text in the edit fieldcaseSensitive - if true, perform a case-sensitive search for the
list itempublic void setIndex(int index)
index - the index in the listpublic final java.util.List<java.lang.String> getList()
public final void setList(java.util.List<java.lang.String> list)
list - new list of stringsCopyright © 2019 Kevin Lamonte. Licensed MIT.