Class MLItemProp
- All Implemented Interfaces:
IBackReferenceProvider
,EventListener
,IFocusComp
,ILockUI
,IMessageBox
,IUIPanelAnimation
,IComponent
,IContentItem
,ICustomDataProvider
,IGProp<GProp<?>[]>
,IPropCnr
,IPropEditorReadOnly
,IUIAction
,IUIActionHolder
,IUIComp
,IUIContextMenuOwner
,IUIFocusComp
,IUISelectionComp
,IUINullableValueComponent
,IVSActionListener
,IVSComponentListener
,IVSComponentState
,IVSFieldListener
,Cloneable
- Direct Known Subclasses:
EMLItemProp
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Nested classes/interfaces inherited from interface com.iizix.gyro.IUIPanelAnimation
IUIPanelAnimation.Direction, IUIPanelAnimation.Speed, IUIPanelAnimation.Type
Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.State
Field Summary
Fields inherited from class com.iizix.prop.ui.AbstractUIAction
VS_FOCUS_ATOM, vsAction, vsDisconnectedAction
Fields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsField
Fields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
Fields inherited from class com.iizix.prop.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_2
Fields inherited from interface com.iizix.prop.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_PRIVATE
Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Fields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNING
Fields inherited from interface com.iizix.gyro.IUIPanelAnimation
ANIMATION_DEFAULT, ANIMATION_FADE_FAST, ANIMATION_FADE_NORMAL, ANIMATION_FADE_SLOW, ANIMATION_FADE_SLOWER, ANIMATION_FADE_SLOWEST, ANIMATION_NO_CSS3_FLAG, ANIMATION_NO_SCROLL_FLAG, ANIMATION_NONE, ANIMATION_PROP_NAME, ANIMATION_SPEED_FAST, ANIMATION_SPEED_NORMAL, ANIMATION_SPEED_SLOW, ANIMATION_SPEED_SLOWER, ANIMATION_SPEED_SLOWEST, ANIMATION_TYPE_COVER, ANIMATION_TYPE_FADE, ANIMATION_TYPE_NONE, ANIMATION_TYPE_REVEAL, ANIMATION_TYPE_SLIDE
Fields inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLE
Constructor Summary
ConstructorDescriptionConstructor of the list item property without name.MLItemProp
(Atom atom) Constructor of the list item property.Method Summary
Modifier and TypeMethodDescriptionprotected void
addMappings
(VSMappings mappings, VSComponent vsStateFocus) Gets the mappings of a VirtualSpace to the panel components.void
assignVSField
(VSField vsField) Assigns the VSField for this item, typically for MLCheckBox or MLSwitch that are connected through VSTable's.clone()
Clones the property.Returns the size of the component in pixels.getContentItem
(boolean createIfNotPresent) Returns the content item that has initialized this property container.final int
Gets the device type: -1=mobile, 0=both, 1=desktop.getGroup()
Gets the group for this item property.Returns the method to use for onUISelection notifications that is attached to this selection component.Gets the current selection of the component.getSelectionListenerHandler
(boolean doCreate) Returns the generic selection listener.Returns the selection property atom for verification of selection changes.int
Gets the selection type of the component.getType()
Gets the type specified for the item.Gets the connected or disconnected VirtualSpace Field.protected VSFocusReference
Gets the focus reference field.void
invokeOnUIActionMethod
(GProp<?> trigger, UIComp contextComponent) Invokes the action event method, overridden to call potential action listeners of the content item.boolean
Returns if the component can show the context menu in mobile mode.boolean
Returns the selection of state of the component.boolean
Returns if the selection component supports index-based selection.boolean
Returns if the selection component supports is cell based.boolean
Returns if the selection component supports index-based selection.boolean
Returns if the selection component supports index-based selection.boolean
Checks if the item is connected to any VS component (action, focus or field).boolean
Checks for the enabled state from any potential VS connections (action, focus or field).boolean
Checks for the read-only state from any potential VS connections (action, focus or field).boolean
Checks for the visible state from any potential VS connections (action, focus or field).void
onEventSelf
(GEvent event) Updates a VirtualSpace Field when a component text changes.protected void
onPrepare
(ClassReference cr, List<Throwable> errors) Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.protected void
Called when a property is disposed of by delete/remove in a container, or by the dispose method.void
onRemoteEvent
(RemoteEvent event) Called when a remote property event should be processed by this property.void
onResolved
(VSRelativeReference<?> reference, VSField field) Called when the property reference has been resolved.void
onValueChanged
(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.final void
setContentItem
(IContentData<?> itemData) Returns the content item that has initialized this property container.protected void
setFocusReference
(String focusReference) Sets the focus reference.boolean
setSelected
(boolean on) Sets the selected state of the action.boolean
setSelected
(int state) Sets the selection state: 0=unselected, 1=selected, 2=third state.setSelection
(IUISelection selection) Sets the selection.void
setVSActionToComponent
(VSAction action) Method called when a VirtualSpace action is resolved or when reconnection is done.Methods inherited from class com.iizix.prop.ui.AbstractUIAction
disconnectVSAction, getMappedVSComponent, getOnUIActionMethod, getVSAction, getVSFocusComponent, isAnimationPropPrivate, isBackReferenceValid, isVSActionDisconnected, onActionCompleted, onActionInvoked, onBroken, onResolved, onStateChanged, processVSComponentSelection, reconnectVSAction, setVSAction, setVSAction, setVSFocusComponent, setVSFocusComponent
Methods inherited from class com.iizix.prop.ui.UIComp
add, assignFontInfoResolver, canAcceptUIContainerFocus, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, 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, getMessage, getMessageText, getPixelHeight, getPixelWidth, getPredefinedProps, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSStateFocus, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, invokeOnUICreateTree, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onSelectionChanged, onStateChanged, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setComponentToVSField, 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, verify, verifyComponentScope
Methods inherited from class com.iizix.prop.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, virtualize
Methods inherited from class com.iizix.prop.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, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.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, setVisible
Methods inherited from interface com.iizix.prop.content.IContentItem
getContentItem, getItemsContainer, isPropertyEditorReadOnly
Methods inherited from interface com.iizix.prop.ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsent
Methods inherited from interface com.iizix.gyro.IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusEx
Methods inherited from interface com.iizix.prop.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, onPropTreeInitialized, 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, verify, warning, warning, warning
Methods inherited from interface com.iizix.gyro.ILockUI
getProgressIndicatorDelay, getProgressIndicatorDelay, getWaitMessage, getWaitMessage, isLockUIEnabled, isLockUIEnabled, setLockUIEnabled, setProgressIndicatorDelay, setWaitMessage, setWaitMessage
Methods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox, messageBox
Methods inherited from interface com.iizix.prop.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, validateClassInstances
Methods inherited from interface com.iizix.prop.ui.IUIAction
enterVSProcessing, exitVSProcessing, invoke, invoke, invoke, onVSStateChanged, setVSActionMessageToComponent, setVSFocus
Methods inherited from interface com.iizix.prop.ui.IUIActionHolder
getBaseJavaReference
Methods inherited from interface com.iizix.prop.ui.IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getCSSClassNames, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponent
Methods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolved
Methods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLost
Methods inherited from interface com.iizix.prop.ui.value.IUINullableValueComponent
isNull, isNullAllowed, setNullAllowed, setValueToNull
Methods inherited from interface com.iizix.gyro.IUIPanelAnimation
getAnimation, getAnimation, getAnimationDescription, getAnimationDirection, getAnimationSpeed, getAnimationType, setAnimation, setAnimation
Methods inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
addSelectionListener, removeSelectionListener
Methods inherited from interface com.iizix.prop.vs.IVSComponentListener
onParentStateChanged
Methods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onStateChanged
Constructor Details
MLItemProp
public MLItemProp()Constructor of the list item property without name.MLItemProp
Constructor of the list item property.- Parameters:
atom
- The name of this property.
Method Details
onPropDispose
protected void onPropDispose()Called when a property is disposed of by delete/remove in a container, or by the dispose method.This call is done just at the end of the delete/remove routine in the container, without synchronization.
During this call, whatever components that e.g. the client needs to disposed of is done.
Subclasses needing to perform some intelligent operations upon deletion should do it by overloading this method and always call the
super.onPropDispose()
method.- Overrides:
onPropDispose
in classUIComp
getType
Gets the type specified for the item.- Returns:
- The list item type.
setContentItem
Returns the content item that has initialized this property container.- Specified by:
setContentItem
in interfaceIContentItem
- Parameters:
itemData
- Sets the content item that has updated this property container.
getContentItem
Returns the content item that has initialized this property container. If it has not been initialized, it will be initialized with this call if the flagcreateIfNotPresent
is true.- Specified by:
getContentItem
in interfaceIContentItem
- Parameters:
createIfNotPresent
- Creates the content data if it doesn't exist if true.- Returns:
- The content item, null if not previously initialized if
createIfNotPresent
is false.
assignVSField
Assigns the VSField for this item, typically for MLCheckBox or MLSwitch that are connected through VSTable's.- Parameters:
vsField
- The field to assign,null
to unassign.
getDeviceType
public final int getDeviceType()Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceType
in interfaceIUIComp
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:
getApproximateSize
in classUIComp
- Returns:
- The size of the component.
- Throws:
IllegalStateException
- If called outside of the Designer, e.g. from the Server.
clone
Clones the property.- Overrides:
clone
in classAbstractUIAction
- Returns:
- The clone.
getGroup
Gets the group for this item property.- Returns:
- The group, or null if not found.
setFocusReference
Sets the focus reference. Overridden in the Designer version of the class to use EditorVSFocusReference instead of VSFocusReference.- Parameters:
focusReference
- The focus reference.
getVSFocusReference
Gets the focus reference field.- Returns:
- The VSFocusReference instance, or null for none.
getSelectionPropAtom
Returns the selection property atom for verification of selection changes.This method is used by the framework in UIComp to fire selection events when the property value changes.
- Specified by:
getSelectionPropAtom
in interfaceIUISelectionComp
- Returns:
- The atom of the selection property, or null if a selection property is not used.
getSelectionListenerHandler
Returns the generic selection listener.- Specified by:
getSelectionListenerHandler
in interfaceIUISelectionComp
- Parameters:
doCreate
- Create the listener handler if it doesn't exist, false not to.- Returns:
- The selection listener handler, or null if not created.
getSelectionType
public int getSelectionType()Gets the selection type of the component.- Specified by:
getSelectionType
in interfaceIUISelectionComp
- Returns:
- A value indicating the selection capability as the SELECTION_TYPE_* values define.
setSelected
public boolean setSelected(boolean on) Sets the selected state of the action. This state is used e.g. for an action to change the image depending on the state. This state is a programmatic state that is also connected to the VirtualSpace action, i.e. the initial state of the component is set according to the VSAction, and if the select state of the VSAction changes, the UI action will follow the same state.Note 1: this state is a programmatic state and does not affect the component apart of e.g. displaying a different image depending on the state (and this is supported in the image definition).
Note 2: Changing the select state in the UI action does NOT affect the VSAction.
- Specified by:
setSelected
in interfaceIUIAction
- Parameters:
on
- The select state.- Returns:
- true for state changed, false for no change.
setSelected
public boolean setSelected(int state) Sets the selection state: 0=unselected, 1=selected, 2=third state.- Parameters:
state
- The state.- Returns:
- true for state changed, false for no change.
- Throws:
IllegalArgumentException
- If the component doesn't support third state and state==2.
isSelected
public boolean isSelected()Returns the selection of state of the component.For a multiple-selection capable component, this indicates any selection, i.e. true is returned as soon as at least one element is selected, false for none.
The checkbox for example has two "selected states": checked and third state: in this case, true is returned for the third state as well as the checked state.
- Specified by:
isSelected
in interfaceIUIAction
- Specified by:
isSelected
in interfaceIUISelectionComp
- Returns:
- true if the component is selected, false otherwise.
isSelectionBooleanBased
public boolean isSelectionBooleanBased()Returns if the selection component supports index-based selection.- Specified by:
isSelectionBooleanBased
in interfaceIUISelectionComp
- Returns:
- true if the list item type is CHECKBOX, SWITCH or RADIO_BUTTON, false otherwise.
isSelectionTriStateBased
public boolean isSelectionTriStateBased()Returns if the selection component supports index-based selection.- Specified by:
isSelectionTriStateBased
in interfaceIUISelectionComp
- Returns:
- true if the list item type is CHECKBOX, false otherwise.
isSelectionIndexBased
public boolean isSelectionIndexBased()Returns if the selection component supports index-based selection.- Specified by:
isSelectionIndexBased
in interfaceIUISelectionComp
- Returns:
- true if the list item type is COMBOBOX, false otherwise.
isSelectionCellBased
public boolean isSelectionCellBased()Returns if the selection component supports is cell based.- Specified by:
isSelectionCellBased
in interfaceIUISelectionComp
- Returns:
- false always.
getSelection
Gets the current selection of the component.- Specified by:
getSelection
in interfaceIUISelectionComp
- Returns:
- Always
as the MList does not support the selection API based onNoSelection
interface (or extending interfaces).IUISelection
setSelection
Sets the selection.- Specified by:
setSelection
in interfaceIUISelectionComp
- Parameters:
selection
- The selection.- Returns:
- "Unsupported selection base" as the MList does not support the selection API based on
interface (or extending interfaces). Use the direction selection API on the MLItem instances or this instance, e.g.IUISelection
setSelected(boolean)
.
onEventSelf
Updates a VirtualSpace Field when a component text changes.- Specified by:
onEventSelf
in interfaceIGProp<GProp<?>[]>
- Overrides:
onEventSelf
in classUIComp
- Parameters:
event
- The property event.
onPrepare
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.Components should override this method to load it's required methods.
- Overrides:
onPrepare
in classAbstractUIAction
- Parameters:
cr
- The class reference with a valid reference.errors
- The list of errors that is returned to the caller in case resolving fails.
getOnUISelectionMethod
Returns the method to use for onUISelection notifications that is attached to this selection component. The method name is not important, but must have the annotation and signature:@OnUISelection(name = "some/property")
public void onUISelection(UISelectionEvent event)- Specified by:
getOnUISelectionMethod
in interfaceIUISelectionComp
- Returns:
- The method, or null if none is registered.
onRemoteEvent
Called when a remote property event should be processed by this property.- Specified by:
onRemoteEvent
in interfaceIGProp<GProp<?>[]>
- Overrides:
onRemoteEvent
in classAbstractUIAction
- Parameters:
event
- The remote event.
invokeOnUIActionMethod
Invokes the action event method, overridden to call potential action listeners of the content item.- Specified by:
invokeOnUIActionMethod
in interfaceIUIAction
- Parameters:
trigger
- The trigger property.contextComponent
- The context component, null for none.
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupported
in interfaceIUIContextMenuOwner
- Returns:
- MList item component supports context menus for mobile.
setVSActionToComponent
Method called when a VirtualSpace action is resolved or when reconnection is done. Override to provide additional processing.By default the following is done:
- all states (enabled, read-only and visible),
- progress delay, and
- and message
- Specified by:
setVSActionToComponent
in interfaceIUIAction
- Parameters:
action
- The VS action.
onResolved
Called when the property reference has been resolved. UI components use this method to set its state according to the field, this is handled in by theUIComp
class.Components must override to provide the implementation for e.g. value contents, styles, etc.
- Specified by:
onResolved
in interfaceIVSFieldListener
- Overrides:
onResolved
in classUIComp
- Parameters:
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.
onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.Components must override to provide the implementation when they are not implementing IPlainTextComponent, in this case the default implementation transports the field string value to this text components plain text.
- Specified by:
onValueChanged
in interfaceIVSFieldListener
- Overrides:
onValueChanged
in 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.
getVSField
Gets the connected or disconnected VirtualSpace Field.- Specified by:
getVSField
in interfaceIUIComp
- Overrides:
getVSField
in classUIComp
- Returns:
- The field, or null if no field resolved (connected or disconnected) is present.
isVSConnected
public boolean isVSConnected()Checks if the item is connected to any VS component (action, focus or field). If so, then the visible, read-only and enabled states may be coming from them.- Returns:
true
if there is a VS connection,false
otherwise.
isVSEnabledInParent
public boolean isVSEnabledInParent()Checks for the enabled state from any potential VS connections (action, focus or field).- Returns:
- The enabled state of all connected items.
isVSReadOnlyInParent
public boolean isVSReadOnlyInParent()Checks for the read-only state from any potential VS connections (action, focus or field).- Returns:
- The read-only state of all connected items.
isVSVisibleInParent
public boolean isVSVisibleInParent()Checks for the visible state from any potential VS connections (action, focus or field).- Returns:
- The visible state of all connected items.
addMappings
Gets the mappings of a VirtualSpace to the panel components.The default is to find the relative references to VS and add those references. Override to provide other functionality.
- Overrides:
addMappings
in classUIComp
- Parameters:
mappings
- The mappings instance to fill in.vsStateFocus
- Do not go past this component when going up in the parent tree, null for none.