public class MLComboBox extends MLItem
The combo-box value can be preceded with a leading text with an optional fixed width, and the text entry will take up the remaining space in the list item.
The combo-box may have a fixed width and be trailing justified (i.e. right for LTR or left for RTL).
An optional description text can be added to the bottom of the list item.
Modifier and Type | Field and Description |
---|---|
static String |
PN_COLUMN_SORT
The property name: Sort column items.
|
static String |
PN_EF_ALIGN
Property name: entry field align trailing (right) "efAlign".
|
static String |
PN_EF_CHAR_UPDATE
Property name: entry field character update "$charUpdate".
|
static String |
PN_EF_HINT
Property name: entry field hint "hint".
|
static String |
PN_EF_MAXIMUM_LENGTH
Property name: maximum entry field input length "maxlen".
|
static String |
PN_EF_TEXT
Property name: field text "efText".
|
static String |
PN_EF_TYPE
Property name: entry field type (soft keyboard, etc: text, password number, tel, email, url) "fldType".
|
static String |
PN_HTML_LIST
The property name: HTML list items.
|
static String |
PN_NULLABLE
The property name: nullable.
|
static String |
PN_SELECTED_ROW
The property name: selected row.
|
static String |
PN_TABLE_SELECT
The property name: VS table select.
|
static String |
PN_TRANSLATE
The property name: Column translation column.
|
static String |
PN_VS_COLUMN
The property name: VS column.
|
static String |
PN_VS_SELECTION
The property name: VS selection.
|
static Object[] |
TABLE_COLUMN_NAME_OR_ATOMS
The table column atoms or property names used.
|
static Value.Type[] |
TABLE_COLUMN_VALUE_TYPES
Best value types for the columns.
|
FIRST_COLUMN_INDEX, PN_ACTION, PN_ANIMATION, PN_DESCRIPTION, PN_ICON, PN_ICON_MARGINS, PN_LEADING_TEXT, PN_LEADING_WIDTH, PN_LEADING_WRAP, PN_V_DESCRIPTION, PN_V_LEADING_TEXT, PN_VS_FOCUS
Constructor and Description |
---|
MLComboBox(KString text,
boolean isArrowDisplayed)
Constructor for a simple item that is to be added into a list.
|
MLComboBox(String text,
boolean isArrowDisplayed)
Constructor for a simple item without trailing text that is to be added into a list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(IMLActionButtonListener listener)
Adds an action button listener.
|
boolean |
addListener(IMLArrowActionListener listener)
Adds an action listener for the arrow.
|
String |
getCharUpdate()
Gets the entry field character update flag.
|
protected int |
getDescriptionColumn()
Returns the column index for the description.
|
String |
getEntryFieldText()
Gets the entry field text for the list item.
|
EntryFieldType |
getEntryFieldType()
Gets the entry field type defined.
|
KString |
getHint()
Gets the entry field hint for the list item.
|
protected int |
getLeadingTextColumn()
Returns the column index for the leading text.
|
int |
getMaximumLength()
Gets the entry field text for the list item.
|
MLItemType |
getType()
Returns the type.
|
void |
initialize(MLItemProp item)
Initializes the item property from the content data.
|
boolean |
isArrowDisplayed()
Returns if the trailing arrow is displayed or not.
|
void |
refreshFromVS(int[] columns)
Refreshes contents from VirtualSpace.
|
boolean |
removeListener(IMLActionButtonListener listener)
Removes an action button listener.
|
boolean |
removeListener(IMLArrowActionListener listener)
Removes an action listener for the arrow.
|
boolean |
setArrowDisplayed(boolean on)
Sets if the trailing arrow should be displayed or not.
|
boolean |
setCharUpdate(boolean on)
Sets the entry field character update flag.
|
boolean |
setEntryFieldText(String text)
Sets the entry field text for the list item.
|
boolean |
setEntryFieldType(EntryFieldType type)
Sets the entry field type.
|
boolean |
setHint(KString text)
Sets the entry field hint for the list item.
|
boolean |
setHint(String text)
Sets the entry field hint for the list item.
|
boolean |
setMaximumLength(int length)
Sets the maximum length of the number of input characters in entry field.
|
addMappings, doBooleanSelectionOnly, getContextMenu, getGroup, getIcon, getIconMargins, getItemProp, getLeadingText, getLeadingTextWrap, getLeadingWidth, getSelectionPropName, getSelectionState, getVSRow, hasActionSupport, isEnabled, isReadOnly, isSelected, isVisible, setActionSupport, setContextMenu, setDescription, setEnabled, setIcon, setIconMargins, setIconPadding, setLeadingText, setLeadingTextEllipsis, setLeadingTextSingleLine, setLeadingTextWrap, setLeadingTextWrap, setLeadingWidth, setReadOnly, setSelected, setSelection, setSelectionInternal, setVisible
public static final String PN_EF_HINT
public static final String PN_EF_MAXIMUM_LENGTH
public static final String PN_EF_ALIGN
public static final String PN_EF_CHAR_UPDATE
public static final String PN_EF_TEXT
public static final String PN_EF_TYPE
public static final String PN_SELECTED_ROW
public static final String PN_NULLABLE
public static final String PN_VS_SELECTION
public static final String PN_VS_COLUMN
public static final String PN_TABLE_SELECT
public static final String PN_TRANSLATE
public static final String PN_COLUMN_SORT
public static final String PN_HTML_LIST
public static Object[] TABLE_COLUMN_NAME_OR_ATOMS
public static Value.Type[] TABLE_COLUMN_VALUE_TYPES
public MLComboBox(String text, boolean isArrowDisplayed)
text
- The leading text, null for none.isArrowDisplayed
- Flag for arrow display.public MLComboBox(KString text, boolean isArrowDisplayed)
text
- The leading text, null for none.isArrowDisplayed
- Flag for arrow display.public MLItemType getType()
protected int getLeadingTextColumn()
getLeadingTextColumn
in class MLItem
protected int getDescriptionColumn()
getDescriptionColumn
in class MLItem
public void refreshFromVS(int[] columns)
refreshFromVS
in interface IContentData<MLItemProp>
refreshFromVS
in class MLItem
columns
- The connected table columns indicies, -1 for none.public void initialize(MLItemProp item)
initialize(MLItemProp)
.item
- The item.public KString getHint()
public boolean setHint(String text)
text
- The new text, or null for none.public boolean setHint(KString text)
text
- The new text, or null for none.IllegalArgumentException
- If the KString is not in PLAIN text format.public int getMaximumLength()
public boolean setMaximumLength(int length)
length
- The new length, or zero for no limit.IllegalArgumentException
- If length is negative.public String getCharUpdate()
public boolean setCharUpdate(boolean on)
on
- false (default) means entry updates server when user leaves the field, true means upon every change.public EntryFieldType getEntryFieldType()
public boolean setEntryFieldType(EntryFieldType type)
type
- The new type.public String getEntryFieldText()
public boolean setEntryFieldText(String text)
text
- The new text, or null for none.public boolean isArrowDisplayed()
public boolean setArrowDisplayed(boolean on)
on
- The display flag: true to display arrow, false not to display arrow.public boolean addListener(IMLActionButtonListener listener)
listener
- The listener to add.NullPointerException
- If the listener is null
.public boolean removeListener(IMLActionButtonListener listener)
listener
- The listener to remove.public boolean addListener(IMLArrowActionListener listener)
listener
- The listener to add.NullPointerException
- If the listener is null
.public boolean removeListener(IMLArrowActionListener listener)
listener
- The listener to remove.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.