Package com.iizix.prop.ui.mlist
Class MLSlider
java.lang.Object
com.iizix.prop.ui.mlist.MLItem
com.iizix.prop.ui.mlist.MLSlider
- All Implemented Interfaces:
- IContentData<MLItemProp>,- ICustomDataProvider,- IMLActionButtonListener,- IMLArrowActionListener
Slider is a component that accepts any user input (sliding selection on a numeric value).
The slider 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.
An action button can be added to the trailing side.
An optional description text can be added to the bottom of the list item.
- Author:
- Mikael Andersson, Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringProperty name: display trailing arrow "arrow".- static final StringProperty name: Maximum value.- static final StringProperty name: Minimum value.- static final StringProperty name: Numeric value.- static final StringProperty name: Value step.- 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 SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- boolean- addListener- (IMLActionButtonListener listener) Adds an action button listener.- boolean- addListener- (IMLArrowActionListener listener) Adds an action listener for the arrow.- protected intReturns the column index for the description.- protected intReturns the column index for the leading text.- doubleGets the maximum value for the list item.- doubleGets the minimum value for the list item.- getType()Returns the type.- double- getValue()Gets the value for the list item.- doubleGets the value step for the list item.- void- initialize- (MLItemProp item) Initializes the item property from the content data.- booleanReturns if the trailing arrow is displayed or not.- void- onActionButtonInvoked- (MLItem item) Called when the action button is invoked by the user.- void- onArrowInvoked- (MLItem item) Called when the arrow action is invoked.- 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- setSetMaxValue- (double d) Sets the maximum value for the list item.- boolean- setSetMinValue- (double d) Sets the minimum value for the list item.- boolean- setValue- (double d) Sets the value for the list item.- boolean- setValueStep- (double d) Sets the value step for the list item.- 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_SL_VALUEProperty name: Numeric value.- See Also:
 
- PN_SL_MAX_VALUEProperty name: Maximum value.- See Also:
 
- PN_SL_MIN_VALUEProperty name: Minimum value.- See Also:
 
- PN_SL_VALUE_STEPProperty name: Value step.- See Also:
 
- PN_ARROWProperty name: display trailing arrow "arrow".- 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- MLSliderConstructor 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.
 
- MLSliderConstructor 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)- Specified by:
- initializein interface- IContentData<MLItemProp>
- Parameters:
- item- The item.
 
- getValuepublic double getValue()Gets the value for the list item.- Returns:
- The double value, or null if not set.
 
- setValuepublic boolean setValue- (double d) Sets the value for the list item.- Parameters:
- d- The new value, or null for none.
- Returns:
- true for changed, false for no change.
 
- getMaxValuepublic double getMaxValue()Gets the maximum value for the list item.- Returns:
- The double value, or null if not set.
 
- setSetMaxValuepublic boolean setSetMaxValue- (double d) Sets the maximum value for the list item.- Parameters:
- d- The new value, or null for none.
- Returns:
- true for changed, false for no change.
 
- getMinValuepublic double getMinValue()Gets the minimum value for the list item.- Returns:
- The double value, or null if not set.
 
- setSetMinValuepublic boolean setSetMinValue- (double d) Sets the minimum value for the list item.- Parameters:
- d- The new value, or null for none.
- Returns:
- true for changed, false for no change.
 
- getValueSteppublic double getValueStep()Gets the value step for the list item.- Returns:
- The double value, or null if not set.
 
- setValueSteppublic boolean setValueStep- (double d) Sets the value step for the list item.- Parameters:
- d- The new value, 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.
 
- onActionButtonInvokedCalled when the action button is invoked by the user. By default, this method will invoke all potential action listeners. A subclass might override this method instead of adding a listener. This subclass should then call the- super.onActionButtonInvoked(item)method in case listeners are added by others.- Specified by:
- onActionButtonInvokedin interface- IMLActionButtonListener
- Parameters:
- item- "this" item.
 
- 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.
 
- onArrowInvokedCalled when the arrow action is invoked. By default, this method will invoke all potential arrow action listeners. A subclass might override this method instead of adding a listener. This subclass should then call the- super.onArrowInvoked(item)method in case listeners are added by others.- Specified by:
- onArrowInvokedin interface- IMLArrowActionListener
- Parameters:
- item- "this" item.