Class MLItemProp
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.prop.ui.UIComp
- com.iizix.prop.ui.AbstractUIAction
- com.iizix.prop.ui.mlist.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
,java.lang.Cloneable
- Direct Known Subclasses:
EMLItemProp
public class MLItemProp extends AbstractUIAction implements IContentItem, IUIFocusComp, IUISelectionComp, IUIContextMenuOwner, IUINullableValueComponent
The property container for mobile list items.- 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_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
Constructors Constructor Description MLItemProp()
Constructor of the list item property without name.MLItemProp(Atom atom)
Constructor of the list item property.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.MLItemProp
clone()
Clones the property.Size
getApproximateSize()
Returns the size of the component in pixels.MLItem
getContentItem(boolean createIfNotPresent)
Returns the content item that has initialized this property container.int
getDeviceType()
Gets the device type: -1=mobile, 0=both, 1=desktop.MLGroup
getGroup()
Gets the group for this item property.java.lang.reflect.Method
getOnUISelectionMethod()
Returns the method to use for onUISelection notifications that is attached to this selection component.IUISelection
getSelection()
Gets the current selection of the component.GenericListener<IUISelectionListener>
getSelectionListenerHandler(boolean doCreate)
Returns the generic selection listener.Atom
getSelectionPropAtom()
Returns the selection property atom for verification of selection changes.int
getSelectionType()
Gets the selection type of the component.MLItemType
getType()
Gets the type specified for the item.VSField
getVSField()
Gets the connected or disconnected VirtualSpace Field.void
invokeOnUIActionMethod(GProp<?> trigger, UIComp contextComponent)
Invokes the action event method, overridden to call potential action listeners of the content item.boolean
isMobileContextMenuSupported()
Returns if the component can show the context menu in mobile mode.boolean
isSelected()
Returns the selection of state of the component.boolean
isSelectionBooleanBased()
Returns if the selection component supports index-based selection.boolean
isSelectionCellBased()
Returns if the selection component supports is cell based.boolean
isSelectionIndexBased()
Returns if the selection component supports index-based selection.boolean
isSelectionTriStateBased()
Returns if the selection component supports index-based selection.void
onEventSelf(GEvent event)
Updates a VirtualSpace Field when a component text changes.protected void
onPrepare(ClassReference cr, java.util.List<java.lang.Throwable> errors)
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.protected void
onPropDispose()
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.void
setContentItem(IContentData<?> itemData)
Returns the content item that has initialized this property container.protected void
setFocusReference(java.lang.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.java.lang.String
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, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, 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, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onSelectionChanged, onStateChanged, onVirtualizationCompleted, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setComponentToVSField, 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, doVirtualizePropCnr, 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, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, 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, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, 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, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParent, getTreeLock, hasChanged, 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, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onVirtualized, 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, verifyHasPropertyItem, 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, getReferences, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, 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, 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, verifyHasPropertyItem, warning, warning, warning
Methods inherited from interface com.iizix.gyro.ILockUI
getProgressIndicatorDelay, getProgressIndicatorDelay, getWaitMessage, getWaitMessage, isLockUIEnabled, isLockUIEnabled, setLockUIEnabled, setProgressIndicatorDelay, setWaitMessage
Methods inherited from interface com.iizix.gyro.IMessageBox
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, isSibling, 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, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, 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 Detail
MLItemProp
public MLItemProp()
Constructor of the list item property without name.
MLItemProp
public MLItemProp(Atom atom)
Constructor of the list item property.- Parameters:
atom
- The name of this property.
Method Detail
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
public MLItemType getType()
Gets the type specified for the item.- Returns:
- The list item type.
setContentItem
public final void setContentItem(IContentData<?> itemData)
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
public MLItem getContentItem(boolean createIfNotPresent)
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
public void assignVSField(VSField vsField)
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
public Size 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:
java.lang.IllegalStateException
- If called outside of the Designer, e.g. from the Server.
clone
public MLItemProp clone()
Clones the property.- Overrides:
clone
in classAbstractUIAction
- Returns:
- The clone.
getGroup
public MLGroup getGroup()
Gets the group for this item property.- Returns:
- The group, or null if not found.
setFocusReference
protected void setFocusReference(java.lang.String focusReference)
Sets the focus reference. Overridden in the Designer version of the class to use EditorVSFocusReference instead of VSFocusReference.- Parameters:
focusReference
- The focus reference.
getSelectionPropAtom
public Atom 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
public GenericListener<IUISelectionListener> getSelectionListenerHandler(boolean doCreate)
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:
java.lang.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
public IUISelection 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
public java.lang.String setSelection(IUISelection selection)
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
public void onEventSelf(GEvent event)
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
protected void onPrepare(ClassReference cr, java.util.List<java.lang.Throwable> errors)
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
public java.lang.reflect.Method 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
public void onRemoteEvent(RemoteEvent event)
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
public void invokeOnUIActionMethod(GProp<?> trigger, UIComp contextComponent)
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
public void setVSActionToComponent(VSAction action)
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
public void onResolved(VSRelativeReference<?> reference, VSField field)
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
public VSField 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.
addMappings
protected void addMappings(VSMappings mappings, VSComponent vsStateFocus)
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.