Class UISlider
java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.prop.ui.UIComp
com.iizix.prop.ui.UISlider
- All Implemented Interfaces:
EventListener, IFocusComp, IMessageBox, IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IPropCnr, IUIComp, IUICompRelativeTarget, IUIContextMenuOwner, IUIFocusComp, IUILabelForTarget, IUIDoubleRangeValueComponent, IUIDoubleValueComponent, IUIValueComponent, IVSComponentListener, IVSComponentState, IVSFieldListener, Cloneable
- Direct Known Subclasses:
EUISlider
public class UISlider extends UIComp implements IUILabelForTarget, IUIFocusComp, IUIDoubleRangeValueComponent, IUIContextMenuOwner
Slider UI component.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface IMessageBox
IMessageBox.IconNested classes/interfaces inherited from interface IVSComponentState
IVSComponentState.StateField Summary
Fields inherited from class UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsFieldFields inherited from class PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields inherited from class GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2Fields inherited from interface IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNINGConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanReturns if the component can be aligned left, right, center, or horizontal fill.booleanReturns if the component can be aligned top, bottom, middle or vertical fill.booleancanFillX()Returns if the component can fill in X or not.booleancanFillY()Returns if the component can fill in Y or not.Returns the size of the component in pixels.booleanGets the click select option.doubleGets the default value of the component as a double.final intGets the device type: -1=mobile, 0=both, 1=desktop.doubleGets the default maximum value.doubleGets the default minimum value.intGets the slider orientation.intGet the page increment value.booleanGets the show buttons option.intGets slide duration option (in milliseconds).intgetTicks()Get the ticks value.booleanReturns if the component has implicit component horizontal fill.booleanReturns if the component has implicit component vertical fill.booleanReturns if the component can show the context menu in mobile mode.voidonValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.booleansetClickSelect(boolean on) Sets the click select option.intSets the text or value from this text or value component to its VirtualSpace Field, if any.booleansetMaximalLength(int ms) Sets the slide duration option (in milliseconds).booleansetPageIncrement(int pi) Set the page increment value.booleansetShowButtons(boolean on) Sets the show buttons option.booleansetTicks(int ticks) Set the ticks value.booleanverify(PropVerification verification) Verifies this property container.Methods inherited from class UIComp
add, addMappings, assignFontInfoResolver, canAcceptUIContainerFocus, canRequestFocus, canRequestFocus, clearErrorMessage, clone, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, doUpdateVSFieldFromUIComponent, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getCSSClassNames, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFirstContainerVSStateFocus, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getPredefinedProps, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSField, getVSStateFocus, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, invokeOnUICreateTree, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onEventSelf, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPrepare, onPropDispose, onRemoteEvent, onResolved, onSelectionChanged, onStateChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setCSSClassNames, setCSSClassNames2, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setUIContainerFocus, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent, verifyComponentScopeMethods inherited from class PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface IComponent
clearErrorMessage, getBadge, getKStringText, getLayoutMgr, getMessage, getMessageText, getStyles, getText, getTooltip, getTooltipText, getUIPanel, getUIParent, isEnabled, isReadOnly, isVisible, messageBox, requestFocus, requestFocus, requestFocusEx, requestFocusEx, setBadge, setBadge, setEnabled, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setText, setText, setTooltip, setTooltip, setVisibleMethods inherited from interface ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusExMethods inherited from interface IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, onRemoteEvent, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, warning, warning, warningMethods inherited from interface IMessageBox
messageBox, messageBox, messageBoxMethods inherited from interface IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstancesMethods inherited from interface IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getCSSClassNames, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setCSSClassNames, setCSSClassNames2, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from interface IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolvedMethods inherited from interface IUIDoubleRangeValueComponent
getMaximum, getMinimum, setMaximum, setMinimum, setRange, setValue, setValueAndRangeMethods inherited from interface IUIDoubleValueComponent
createValueProp, getValue, getValueOrDefaultMethods inherited from interface IUIFocusComp
onFocusGained, onFocusLostMethods inherited from interface IVSComponentListener
onParentStateChangedMethods inherited from interface IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged
Constructor Details
UISlider
public UISlider()Creates the component without a name. The name must be set in all cases using thesetPropertyAtomcall.UISlider
Creates the component with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- the name of the component, unique within it's parent.
Method Details
getDeviceType
public final int getDeviceType()Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceTypein interfaceIUIComp- Returns:
- 0=both.
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupportedin interfaceIUIContextMenuOwner- Returns:
- Slider does not support a mobile context menu.
getOrientation
public int getOrientation()Gets the slider orientation.- Returns:
- 0 for horizontal, 1 for vertical.
canFillX
canFillY
canAlignX
canAlignY
hasImplicitAlignFillX
public boolean hasImplicitAlignFillX()Returns if the component has implicit component horizontal fill.- Overrides:
hasImplicitAlignFillXin classUIComp- Returns:
- Always true: true means component will always fill the space in X.
hasImplicitAlignFillY
public boolean hasImplicitAlignFillY()Returns if the component has implicit component vertical fill.- Overrides:
hasImplicitAlignFillYin classUIComp- Returns:
- Always: true means component will always fill the space in Y.
setComponentToVSField
public int setComponentToVSField()Sets the text or value from this text or value component to its VirtualSpace Field, if any.- Specified by:
setComponentToVSFieldin interfaceIUIComp- Overrides:
setComponentToVSFieldin classUIComp- Returns:
- 1 for update completed, 0 for nothing done and -1 for error occurred.
onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.- Specified by:
onValueChangedin interfaceIVSFieldListener- Overrides:
onValueChangedin classUIComp- Parameters:
field- The VS field.value- The value, never null, butvalue.isNull()could be true.trigger- The trigger property that may be null.postProcessing- Post-processing instance.
getTicks
public int getTicks()Get the ticks value.- Returns:
- The ticks value, or zero meaning no ticks, i.e. continuous scale (no discrete values). A defined ticks property value of 1 has the same meaning as zero, so zero is returned if the ticks property is set to 1.
setTicks
Set the ticks value. Zero means continuous scale (no discrete values).- Parameters:
ticks- The ticks value must be either zero (means continuous scale) or a value of 2 or larger.- Returns:
- true if ticks is set successfully.
- Throws:
IllegalArgumentException- Whenticksis negative or one.
getPageIncrement
public int getPageIncrement()Get the page increment value. Number of discrete values (if specified) to move on Page Up/Page Down (default 5). If the scale is set to continuous, this value is not used.This value is only used for Desktop, not for Mobile.
- Returns:
- The page increment or if property is undefined, 5 (default).
setPageIncrement
Set the page increment value. Number of discrete values (if specified) to move on Page Up/Page Down (default 5). If the scale is set to continuous, this value is not used.This value is only used for Desktop, not for Mobile.
- Parameters:
pi- The page increment.- Returns:
- true for value changed, false for no change.
- Throws:
IllegalArgumentException- Whenpiis negative or ifpiis larger than the number of ticks.
getMinimumDefault
public double getMinimumDefault()Gets the default minimum value.- Specified by:
getMinimumDefaultin interfaceIUIDoubleRangeValueComponent- Returns:
- Zero, the default minimum value.
getMaximumDefault
public double getMaximumDefault()Gets the default maximum value.- Specified by:
getMaximumDefaultin interfaceIUIDoubleRangeValueComponent- Returns:
- 100, the default maximum value.
getDefaultValue
public double getDefaultValue()Gets the default value of the component as a double.- Specified by:
getDefaultValuein interfaceIUIDoubleValueComponent- Returns:
- The minimum value
is used as the default double value of the component.IUIDoubleRangeValueComponent.getMinimum()
getShowButtons
public boolean getShowButtons()Gets the show buttons option.- Returns:
- The show buttons option.
setShowButtons
public boolean setShowButtons(boolean on) Sets the show buttons option.- Parameters:
on- Set the show buttons option.- Returns:
- true for value changed, false for no change.
getClickSelect
public boolean getClickSelect()Gets the click select option.- Returns:
- The click select option.
setClickSelect
public boolean setClickSelect(boolean on) Sets the click select option.- Parameters:
on- Set the click select option.- Returns:
- true for value changed, false for no change.
getSlideDuration
public int getSlideDuration()Gets slide duration option (in milliseconds). The default value is 500 ms.- Returns:
- The slide duration or 500 by default.
setMaximalLength
public boolean setMaximalLength(int ms) Sets the slide duration option (in milliseconds).- Parameters:
ms- The duration to set.- Returns:
- Successful or not.
getApproximateSize
Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).- Specified by:
getApproximateSizein classUIComp- Returns:
- The size of the component.
verify
Verifies this property container. The check performed is the extension of classes and that no circular reference is present.