Class UIContextMenu
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.prop.ui.UIComp
- com.iizix.prop.ui.UIContainer
- com.iizix.prop.ui.UIMenu
- com.iizix.prop.ui.UIContextMenu
- All Implemented Interfaces:
EventListener
,IFocusComp
,IMessageBox
,IComponent
,IClassReferenceOwner
,ICustomDataProvider
,IGProp<GProp<?>[]>
,IPropCnr
,IReferrerParticipant
,IUIClassReferenceOwner
,IUIComp
,IUIContainer
,IUIContextMenuOwner
,IUIFocusComp
,IUIGroupSeparator
,IUIPanelOwner
,IUIHTMLTextComponent
,IUITextComponent
,IVSAccessor
,IVSComponentListener
,IVSComponentState
,IVSFieldListener
,IVSGenericComponentListener
,IVSParticipant
,java.lang.Cloneable
- Direct Known Subclasses:
EUIContextMenu
public class UIContextMenu extends UIMenu implements IUIPanelOwner, IUIClassReferenceOwner, IUIGroupSeparator
Context menu UI container.- 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.prop.vs.IVSComponentState
IVSComponentState.State
Field Summary
Fields inherited from class com.iizix.prop.ui.UIContainer
UICOMP_CLASS, VS_STATE_FOCUS_PROP_NAME
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
Constructor Summary
Constructors Constructor Description UIContextMenu()
Creates the container without name with a null value.UIContextMenu(Atom propertyAtom)
Creates the container with the specified name with a null value.UIContextMenu(Atom propertyAtom, GProp<?>[] properties)
Creates the container with the specified name and properties.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UIContextMenu
clone()
Creates a clone out of this property.VSParticipant
createVSReference(Atom refAtom, PropCnr[] returnParent)
Creates a VSReference instance from the container or any parent containers.protected void
doVirtualizePropCnr(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, GProp<?>[] props, java.lang.String extendsName, VirtualSpace virtualSpace, PropCnr virtualizedProp, PropCnr clonedProp)
The rest of the virtualization is done using the correct "this" for inner classes.Size
getApproximateSize()
Returns the size of the component in pixels.IAppSessionGyro
getAppSessionGyro()
Returns the Application Session Gyro instance of this virtualized property.IClientSessionGyro
getClientSessionGyro()
Returns the Client Session Gyro instance of this virtualized property.TextTable
getDefaultTextTable()
Gets the default text table of the panel.int
getDeviceType()
Gets the device type: -1=mobile, 0=both, 1=desktop.int
getGroupID(GroupNameProp groupName)
Gets the unique ID for a group name.UIPanelBase
getPanelOwner()
Gets the panel owner.java.lang.String
getParticipantDescription()
Returns the given description of the referrer participant.java.lang.String
getParticipantType()
Returns the given type of the referrer participant.PropCnr
getPropBaseReference()
The panel is the base component base reference.VirtualSpace
getVirtualSpace()
Gets the VirtualSpace for this panel.VSParticipant
getVSParticipant()
Gets the VSParticipant instance.VSParticipant
getVSReference(Atom refAtom)
Gets a VSReference instance from the container or any parent containers.protected void
invokeOnUICreateMethod(UIComp component)
Invoke the create event methods of the component and the panel.protected void
invokeOnUIDestroyMethod(UIComp component)
Invoke the create event methods of the component and the panel.void
invokeOnUISelectionMethod(IUISelectionComp source, GProp<?> trigger)
Invoke the focus event method.void
invokeOnUITextChangeMethod(UIComp component, GProp<?> trigger)
Invoke the onUITextChange event methods of the component and the panel.boolean
isParticipating(EnvProps envProps)
Checks if this panel is participating in the VirtualSpace, i.e.boolean
isPrimaryParticipant()
Checks if this panel is primary or not.protected void
onPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, java.util.List<java.lang.Throwable> errors)
Called when the application is being prepared.void
onVirtualSpaceVirtualized(IAppSessionGyro appGyro, VirtualSpace virtualizedVirtualSpace)
Called when the VirtualSpace has been virtualized, giving the opportunity for e.g.UIContextMenu
virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace)
Call this method to "virtualize" a property tree.Methods inherited from class com.iizix.prop.ui.UIMenu
isContextMenuSupported
Methods inherited from class com.iizix.prop.ui.UIContainer
addPredefinedProps, addPredefinedPropsImpl, canAcceptUIContainerFocus, createCompsCnr, getComponentCount, getComponents, getCompsCnr, getFirstContainerVSStateFocus, getFirstUIComponent, getFirstUIComponentNull, getPredefinedProps, getRadioSelectionComponents, getSelectedRadioComponent, getUIComponent, getUIComponentNull, getVSStateFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, isEmptyContainerAllowed, isMobileContextMenuSupported, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onResolved, onSelectionChanged, onSelectionChanged, onStateChanged, onVSComponentSelectionChanged, resetComponentID, setRadioSelectionComponent, setUIContainerFocus, updateUICompsReference, verify, verifyComponentScope
Methods inherited from class com.iizix.prop.ui.UIComp
add, addMappings, assignFontInfoResolver, 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, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVSField, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, onBroken, onEventSelf, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPropDispose, onRemoteEvent, onResolved, onStateChanged, onValueChanged, onVirtualizationCompleted, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, setBadge, setBadge, setComponentToVSField, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent
Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, 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, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, 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, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, 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.prop.IClassReferenceOwner
getClassReference, getProp, getRuntimeClassInstance, getRuntimeClassInstance
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.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, getAtomPath, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getReferences, getRelativePropName, getRootParent, getTreeLock, getValueClasses, 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, 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, verify, verifyHasPropertyItem, warning, warning, warning
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.IUIClassReferenceOwner
getClassReference, getClassReferenceAtom, getClassReferenceImplementsInterface, getClassReferenceRequiredAnnotation, isClassReferenceAnnotationBackReferenceRequired
Methods inherited from interface com.iizix.prop.ui.IUIComp
disconnectVSField, getComponentID, getComponentMappings, getErrorMessage, getErrorMessage, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setErrorMessage, setErrorMessage, setVSFieldMessageToComponent, setVSFieldToComponent
Methods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, onBroken, onResolved
Methods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLost
Methods inherited from interface com.iizix.prop.ui.IUIGroupSeparator
getRadioSelectionComponents, setRadioSelectionComponent, setRadioSelectionComponent
Methods inherited from interface com.iizix.prop.ui.text.IUIHTMLTextComponent
createTextProp
Methods inherited from interface com.iizix.prop.vs.IVSComponentListener
onParentStateChanged
Methods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
Methods inherited from interface com.iizix.prop.vs.IVSParticipant
assignVirtualSpace, getVSParticipantAtom
Constructor Detail
UIContextMenu
public UIContextMenu()
Creates the container without name with a null value.
UIContextMenu
public UIContextMenu(Atom propertyAtom)
Creates the container with the specified name with a null value.- Parameters:
propertyAtom
- the property atom.
UIContextMenu
public UIContextMenu(Atom propertyAtom, GProp<?>[] properties) throws PropException
Creates the container with the specified name and properties.- Parameters:
propertyAtom
- the property atom.properties
- the property array value for the container.- Throws:
PropException
- when properties are not correctly defined.
Method Detail
getDeviceType
public final int getDeviceType()
Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceType
in interfaceIUIComp
- Overrides:
getDeviceType
in classUIMenu
clone
public UIContextMenu clone()
Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.Cloning is used for "virtualization" of a property tree in the server. Client property classes will therefore throw
CloneNotSupportedException
.Once a tree has been cloned, the change-flag is reset, and the create-flag is set. All listeners are also removed! The new cloned property is an orphan, i.e. has no parent set. All children properties are also (deep) cloned.
Note that the cloning process is done WITHOUT thread synchronization for performance reasons, thus no modifications should be done to the tree!
- Overrides:
clone
in classUIContainer
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).- Overrides:
getApproximateSize
in classUIContainer
- Returns:
- The size of the component: 0x0 (none).
getDefaultTextTable
public TextTable getDefaultTextTable()
Gets the default text table of the panel. This text table may be derived from another base table, and the default input language code can also be checked.- Returns:
- The default text table, or null if not defined.
virtualize
public UIContextMenu virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) throws java.lang.CloneNotSupportedException, PropException
Call this method to "virtualize" a property tree. This method is used at runtime in the Server for the application session of virtual instances of VirtualSpace, but also virtual instances of panels, for the individual client session. The VirtualSpace is virtualized once for the application session and is shared for parallel client sessions.This method is similar to cloning, but enables references that are already resolved to remain if they point to a shared instance, e.g. the VirtualSpace pointing to its participants in the application property container shared instance, or a panel with references to text IDs, assets, etc.
It is up to the property class to handle this by overriding this method.
- Parameters:
appGyro
- The application gyro instance performing the virtualization.clientGyro
- The client gyro session, can benull
if not initialized from the client gyro.virtualSpace
- The virtualized or virtualizing VirtualSpace.- Throws:
java.lang.CloneNotSupportedException
- If a subclass doesn't allow cloning, e.g. the client properties.PropException
- For property errors during the virtualization.
doVirtualizePropCnr
protected void doVirtualizePropCnr(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, GProp<?>[] props, java.lang.String extendsName, VirtualSpace virtualSpace, PropCnr virtualizedProp, PropCnr clonedProp) throws java.lang.CloneNotSupportedException, PropException
The rest of the virtualization is done using the correct "this" for inner classes.Do not call this method! The method is intended for classes that are virtualized and needs to set-up the AppSessionGyro, ClientSessionGyro and VirtualSpace very early in the virtualizing process.
- Overrides:
doVirtualizePropCnr
in classPropCnr
- Parameters:
appGyro
- The application gyro instance performing the virtualization.clientGyro
- The client gyro session, can benull
if not initialized from the client gyro.props
- The children properties to virtualize.extendsName
- The name in extends to virtualize.virtualSpace
- The virtualized or virtualizing VirtualSpace.virtualizedProp
- The property being virtualized.clonedProp
- The property that is cloned to produce this virtualized property.- Throws:
java.lang.CloneNotSupportedException
- If a subclass doesn't allow cloning, e.g. the client properties.PropException
- For property errors during the virtualization.
getAppSessionGyro
public IAppSessionGyro getAppSessionGyro()
Returns the Application Session Gyro instance of this virtualized property.- Specified by:
getAppSessionGyro
in interfaceIGProp<GProp<?>[]>
- Overrides:
getAppSessionGyro
in classGProp<GProp<?>[]>
- Returns:
- The Application Session Gyro if this instance is virtualized, null otherwise.
getClientSessionGyro
public IClientSessionGyro getClientSessionGyro()
Returns the Client Session Gyro instance of this virtualized property. This method only work for properties in a panel tree. Data connectors may sometimes also provide
support.IClientSessionGyro
To get the
instance from the current thread useIClientSessionGyro
, orIClientSessionGyro.getSessionInstance()
to get it from the session information instance.IClientSessionGyro.getSessionInstance(SessionInfo)
- Specified by:
getClientSessionGyro
in interfaceIGProp<GProp<?>[]>
- Overrides:
getClientSessionGyro
in classGProp<GProp<?>[]>
- Returns:
- The Client Session Gyro if this instance is virtualized and is in a
UIPanelBase
(panels) tree (or for certain data connectors), null otherwise.
getPropBaseReference
public PropCnr getPropBaseReference()
The panel is the base component base reference.- Specified by:
getPropBaseReference
in interfaceIGProp<GProp<?>[]>
- Overrides:
getPropBaseReference
in classPropCnr
- Returns:
- This UIContextMenu instance.
getPanelOwner
public UIPanelBase getPanelOwner()
Gets the panel owner. This method only returns non-null when a panel is virtualized and has virtualized this context menu.- Specified by:
getPanelOwner
in interfaceIUIPanelOwner
- Returns:
- The panel itself or that owns e.g. the context menu, null for none.
getVSReference
public VSParticipant getVSReference(Atom refAtom)
Gets a VSReference instance from the container or any parent containers. The method is used byVSRelativeReference
to look up theVSReference
instance in order to resolve the relative path to the target property.- Specified by:
getVSReference
in interfaceIGProp<GProp<?>[]>
- Overrides:
getVSReference
in classPropCnr
- Parameters:
refAtom
- The property atom of the requesting relative reference property.- Returns:
- The instance of the
VSParticipant
(that extends VSReference) ornull
if unassigned.
createVSReference
public VSParticipant createVSReference(Atom refAtom, PropCnr[] returnParent)
Creates a VSReference instance from the container or any parent containers. The method is used in the Designer to create a VirtualSpace connection forVSRelativeReference
to look up theVSReference
instance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnr
that has a VSReference as property, and *SHOULD* matchgetVSReference(Atom)
.The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached,
null
is returned.- Overrides:
createVSReference
in classPropCnr
- Parameters:
refAtom
- The property asking for the VSReference.returnParent
- An array of PropCnr [1] that will be filled in with the parent property of the VSRefernce.- Returns:
- The instance of the
VSReference
ornull
if unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.For this method, it's a VSParticipant.
getVSParticipant
public VSParticipant getVSParticipant()
Gets the VSParticipant instance. This is also an instance ofVSReference
.- Specified by:
getVSParticipant
in interfaceIUIPanelOwner
- Returns:
- The instance of the VSParticipant, or null if not yet defined.
getVirtualSpace
public VirtualSpace getVirtualSpace()
Gets the VirtualSpace for this panel.Method for IVSParticipant: Gets the referrer's back-reference to the VirtualSpace. This is used by the VSParticipantReference when verifying its references.
- Specified by:
getVirtualSpace
in interfaceIUIComp
- Specified by:
getVirtualSpace
in interfaceIVSAccessor
- Overrides:
getVirtualSpace
in classUIComp
- Returns:
- The VirtualSpace, or null for none.
getParticipantDescription
public java.lang.String getParticipantDescription()
Returns the given description of the referrer participant.- Specified by:
getParticipantDescription
in interfaceIReferrerParticipant
- Returns:
- The string the Designer entered in the Description field, or "n/a" for none.
getParticipantType
public java.lang.String getParticipantType()
Returns the given type of the referrer participant.- Specified by:
getParticipantType
in interfaceIReferrerParticipant
isPrimaryParticipant
public final boolean isPrimaryParticipant()
Checks if this panel is primary or not. A primary participant is chosen in the selection processing when multiple participants are ordered in a VSParticipantsHolder container.- Specified by:
isPrimaryParticipant
in interfaceIReferrerParticipant
- Returns:
- When virtualized, the owner panels participant state is returned, otherwise always false: context menus are secondary.
getGroupID
public int getGroupID(GroupNameProp groupName)
Gets the unique ID for a group name.- Specified by:
getGroupID
in interfaceIUIGroupSeparator
- Parameters:
groupName
- The group name. Return The unique for the group name.
onPrepare
protected void onPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, java.util.List<java.lang.Throwable> errors) throws PropException
Called when the application is being prepared. The order ofonPrepare
calls is always parent first, the children. The method is called twice, first time withisPostCall
set tofalse
, then a second time withtrue
.- Overrides:
onPrepare
in classUIComp
- Parameters:
appOwner
- The application owner.moduleOwner
- The Module owner.isPostCall
- Flag indicating this is a post-call.errors
- A list of errors that occurred but did not cause an abort.- Throws:
PropException
- For property errors during the application preparation to need to abort.
invokeOnUICreateMethod
protected void invokeOnUICreateMethod(UIComp component)
Invoke the create event methods of the component and the panel.This method is not intended to be called, it is used by the framework.
- Parameters:
component
- The UI component.
invokeOnUIDestroyMethod
protected void invokeOnUIDestroyMethod(UIComp component)
Invoke the create event methods of the component and the panel.This method is not intended to be called, it is used by the framework.
- Parameters:
component
- The UI component.
invokeOnUITextChangeMethod
public void invokeOnUITextChangeMethod(UIComp component, GProp<?> trigger)
Invoke the onUITextChange event methods of the component and the panel.- Parameters:
component
- The UI component.trigger
- The trigger property.
invokeOnUISelectionMethod
public void invokeOnUISelectionMethod(IUISelectionComp source, GProp<?> trigger)
Invoke the focus event method.- Parameters:
source
- The selection UI component source.trigger
- The trigger, null for none.
isParticipating
public boolean isParticipating(EnvProps envProps)
Checks if this panel is participating in the VirtualSpace, i.e. if it's used in the current user session or if it's e.g. the wrong resolution or device.- Specified by:
isParticipating
in interfaceIReferrerParticipant
- Parameters:
envProps
- The Client Environment instance of the current client connection.- Returns:
- The participation state is always false for a context menu, as it is a "slave" to its panels where used or referenced.
onVirtualSpaceVirtualized
public void onVirtualSpaceVirtualized(IAppSessionGyro appGyro, VirtualSpace virtualizedVirtualSpace)
Called when the VirtualSpace has been virtualized, giving the opportunity for e.g. data connectors to prepare it's virtualized counterparts if this is required.This call is done to the non-virtualized instance of the VirtualSpace participant.
- Specified by:
onVirtualSpaceVirtualized
in interfaceIVSParticipant
- Parameters:
appGyro
- The application gyro instance.virtualizedVirtualSpace
- The virtualized VirtualSpace instance.