Package com.iizix.prop.ui.mlist
Class MLComboBox
java.lang.Object
com.iizix.prop.ui.mlist.MLItem
com.iizix.prop.ui.mlist.MLComboBox
- All Implemented Interfaces:
- IContentData<MLItemProp>,- ICustomDataProvider
ComboBox is a value field that will show a overlay widget to select its value from.
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.
- Author:
- Mikael Andersson
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringThe property name: Sort column items.- static final StringProperty name: entry field align trailing (right) "efAlign".- static final StringProperty name: entry field character update "$charUpdate".- static final StringProperty name: entry field hint "hint".- static final StringProperty name: maximum entry field input length "maxlen".- static final StringProperty name: field text "efText".- static final StringProperty name: entry field type (soft keyboard, etc: text, password number, tel, email, url) "fldType".- static final StringThe property name: HTML list items.- static final StringThe property name: nullable.- static final StringThe property name: selected row.- static final StringThe property name: VS table select.- static final StringThe property name: Column translation column.- static final StringThe property name: VS column.- static final StringThe property name: VS selection.- static Object[]The table column atoms or property names used.- static Value.Type[]Best value types for the columns.- Fields inherited from class com.iizix.prop.ui.mlist.MLItem- 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 SummaryConstructorsConstructorDescription- 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.
- Method SummaryModifier and TypeMethodDescription- boolean- addListener- (IMLActionButtonListener listener) Adds an action button listener.- boolean- addListener- (IMLArrowActionListener listener) Adds an action listener for the arrow.Gets the entry field character update flag.- protected intReturns the column index for the description.Gets the entry field text for the list item.Gets the entry field type defined.- getHint()Gets the entry field hint for the list item.- protected intReturns the column index for the leading text.- intGets the entry field text for the list item.- getType()Returns the type.- void- initialize- (MLItemProp item) Initializes the item property from the content data.- booleanReturns 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.- booleanSets the entry field type.- booleanSets the entry field hint for the list item.- booleanSets 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.- Methods inherited from class com.iizix.prop.ui.mlist.MLItem- addMappings, doBooleanSelectionOnly, forbiddenGetCustomDataMap, 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- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait- Methods inherited from interface com.iizix.prop.ICustomDataProvider- getCustomData, putCustomData, putCustomDataIfAbsent
- Field Details- PN_EF_HINTProperty name: entry field hint "hint".- See Also:
 
- PN_EF_MAXIMUM_LENGTHProperty name: maximum entry field input length "maxlen".- See Also:
 
- PN_EF_ALIGNProperty name: entry field align trailing (right) "efAlign".- See Also:
 
- PN_EF_CHAR_UPDATEProperty name: entry field character update "$charUpdate".- See Also:
 
- PN_EF_TEXTProperty name: field text "efText".- See Also:
 
- PN_EF_TYPEProperty name: entry field type (soft keyboard, etc: text, password number, tel, email, url) "fldType".- See Also:
 
- PN_SELECTED_ROWThe property name: selected row.- See Also:
 
- PN_NULLABLEThe property name: nullable.- See Also:
 
- PN_VS_SELECTIONThe property name: VS selection.- See Also:
 
- PN_VS_COLUMNThe property name: VS column.- See Also:
 
- PN_TABLE_SELECTThe property name: VS table select.- See Also:
 
- PN_TRANSLATEThe property name: Column translation column.- See Also:
 
- PN_COLUMN_SORTThe property name: Sort column items.- See Also:
 
- PN_HTML_LISTThe property name: HTML list items.- See Also:
 
- TABLE_COLUMN_NAME_OR_ATOMSThe table column atoms or property names used.
- TABLE_COLUMN_VALUE_TYPESBest value types for the columns.
 
- Constructor Details- MLComboBoxConstructor for a simple item without trailing text that is to be added into a list.- Parameters:
- text- The leading text, null for none.
- isArrowDisplayed- Flag for arrow display.
 
- MLComboBoxConstructor for a simple item that is to be added into a list.- Parameters:
- text- The leading text, null for none.
- isArrowDisplayed- Flag for arrow display.
 
 
- Method Details- getTypeReturns the type.
- getLeadingTextColumnprotected int getLeadingTextColumn()Returns the column index for the leading text. Types supporting description text must override this method.- Specified by:
- getLeadingTextColumnin class- MLItem
- Returns:
- The column index, or -1 for none.
 
- getDescriptionColumnprotected int getDescriptionColumn()Returns the column index for the description. Types supporting description text must override this method.- Specified by:
- getDescriptionColumnin class- MLItem
- Returns:
- The column index = 2.
 
- refreshFromVSpublic void refreshFromVS- (int[] columns) Refreshes contents from VirtualSpace.- Specified by:
- refreshFromVSin interface- IContentData<MLItemProp>
- Specified by:
- refreshFromVSin class- MLItem
- Parameters:
- columns- The connected table columns indicies, -1 for none.
 
- initializeInitializes the item property from the content data. Each list item must implement this method to provider initialization of its own and call- initialize(MLItemProp)- Parameters:
- item- The item.
 
- getHintGets the entry field hint for the list item. It defines a hint to help users fill out the input field (also called place holder in HTML).- Returns:
- The text, or null if none is set.
 
- setHintSets the entry field hint for the list item. It defines a hint to help users fill out the input field (also called place holder in HTML).- Parameters:
- text- The new text, or null for none.
- Returns:
- true for changed, false for no change.
 
- setHintSets the entry field hint for the list item. It defines a hint to help users fill out the input field (also called place holder in HTML).- Parameters:
- text- The new text, or null for none.
- Returns:
- true for changed, false for no change.
- Throws:
- IllegalArgumentException- If the KString is not in PLAIN text format.
 
- getMaximumLengthpublic int getMaximumLength()Gets the entry field text for the list item.- Returns:
- The maximum character input length, zero for no limit.
 
- setMaximumLengthpublic boolean setMaximumLength- (int length) Sets the maximum length of the number of input characters in entry field.- Parameters:
- length- The new length, or zero for no limit.
- Returns:
- true for changed, false for no change.
- Throws:
- IllegalArgumentException- If length is negative.
 
- getCharUpdateGets the entry field character update flag.- Returns:
- false (default) means entry updates server when user leaves the field, true means upon every change.
 
- setCharUpdatepublic boolean setCharUpdate- (boolean on) Sets the entry field character update flag.- Parameters:
- on- false (default) means entry updates server when user leaves the field, true means upon every change.
- Returns:
- true for changed, false for no change.
 
- getEntryFieldTypeGets the entry field type defined.- Returns:
- The entry field type.
 
- setEntryFieldTypeSets the entry field type.- Parameters:
- type- The new type.
- Returns:
- true for value changed, false for no change.
 
- getEntryFieldTextGets the entry field text for the list item.- Returns:
- The text, or null if none is set.
 
- setEntryFieldTextSets the entry field text for the list item.- Parameters:
- text- The new text, or null for none.
- Returns:
- true for changed, false for no change.
 
- isArrowDisplayedpublic boolean isArrowDisplayed()Returns if the trailing arrow is displayed or not.- Returns:
- true to display arrow, false not to display arrow.
 
- setArrowDisplayedpublic boolean setArrowDisplayed- (boolean on) Sets if the trailing arrow should be displayed or not.- Parameters:
- on- The display flag: true to display arrow, false not to display arrow.
- Returns:
- true for changed, false for no change.
 
- addListenerAdds an action button listener. Calling this method multiple times with the same listener will have no effect (but to return false).- Parameters:
- listener- The listener to add.
- Returns:
- true if the listener was added, false otherwise.
- Throws:
- NullPointerException- If the listener is- null.
 
- removeListenerRemoves an action button listener.- Parameters:
- listener- The listener to remove.
- Returns:
- true if listener is successfully removed, false otherwise.
 
- addListenerAdds an action listener for the arrow. Calling this method multiple times with the same listener will have no effect (but to return false).- Parameters:
- listener- The listener to add.
- Returns:
- true if the listener was added, false otherwise.
- Throws:
- NullPointerException- If the listener is- null.
 
- removeListenerRemoves an action listener for the arrow.- Parameters:
- listener- The listener to remove.
- Returns:
- true if listener is successfully removed, false otherwise.