Class VirtualSpace
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.prop.vs.VirtualSpace
- All Implemented Interfaces:
IPrivateStorage,EventListener,IFocusComp,IMessageBox,IClassReferenceOwner,ICustomDataProvider,IGProp<GProp<?>[]>,IPropCnr,IVSAccessor,IVSClassReferenceOwner,IVSComponent,IVSComponentListener,IVSComponentState,IVSMessageComponent,java.lang.Cloneable
- Direct Known Subclasses:
EditorVirtualSpace
public class VirtualSpace extends PropCnr implements IVSMessageComponent, IVSClassReferenceOwner, IPrivateStorage, IVSAccessor
This VirtualSpace property container holds the fields and tables in the VirtualSpace.
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 Modifier and Type Field Description static java.lang.StringMAP_CLASS_PROP_NAMEThe focus mapper class property name: "mapClass".protected VSParticipantsHolderparticipantsHolderThe participants holder.Fields inherited from class com.iizix.prop.PropCnr
EMPTY, 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.vs.IVSComponent
ERROR, INFORMATION, NONE, PN_IGNORE_UI_FOCUS, WARNING
Constructor Summary
Constructors Constructor Description VirtualSpace()Creates the VirtualSpace property container without a name.VirtualSpace(Atom propertyAtom)Creates the VirtualSpace property container with the specified name.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddPredefinedProps()Adds the predefined properties for this container.booleanareFree(java.lang.Runnable callback, boolean callbackIfFree, VSComponent... components)Verifies if the component(s) is/are included in a work unit currently in progress in this VirtualSpace.booleanareFree2(java.lang.Runnable callback, boolean callbackIfFree, VSComponent component, VSComponent... components)Verifies if the components are included in a work unit currently in progress in this VirtualSpace.java.lang.StringcanRequestFocus()Returns if this component can receive focus.VirtualSpaceclone()Clones the property.java.lang.StringcouldRequestFocusIfVirtualized(boolean ignoreStates)Returns if this component could receive focus if it would be virtualized.protected VSParticipantsHoldercreateVSParticipantsHolder()Creates a new instance of the VSParticipantsHolder.VSReferencecreateVSReference(Atom refAtom, PropCnr[] returnParent)Creates a VSReference instance from the container or any parent containers.protected voiddoVirtualizePropCnr(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.java.util.Map<java.lang.String,java.lang.Object>forbiddenGetCustomDataMap(boolean doCreate)Deprecated.VSActiongetAction(@VSRef java.lang.String path)Gets the action with the specified path.VSActiongetAction2(@FullVSRef java.lang.String fullVSRef)Gets the action with the specified full VS reference path.VSActiongetActionNull(@VSRef java.lang.String path)Gets the action with the specified path.VSActiongetActionNull2(@FullVSRef java.lang.String fullVSRef)Gets the action with the specified full VS reference path.IAppSessionGyrogetAppSessionGyro()Returns the Application Session Gyro instance of this virtualized property.UIPanelBase[]getAttachedVirtualizedPanels()Gets the attached panels of this current instance of the VirtualSpace.IClientSessionGyrogetClientSessionGyro()Returns the Client Session Gyro instance.VSFieldgetField(@VSRef java.lang.String path)Gets the field with the specified path.VSFieldgetField2(@FullVSRef java.lang.String fullVSRef)Gets the field with the specified full VS reference path.VSFieldgetFieldNull(@VSRef java.lang.String path)Gets the field with the specified path.VSFieldgetFieldNull2(@FullVSRef java.lang.String fullVSRef)Gets the field with the specified full VS reference path.IVSFocusHandlergetFocusHandler()Returns the instance for the VirtualSpace focus handler.VSGroupgetGroup(@VSRef java.lang.String path)Gets the group with the specified path.VSGroupgetGroup2(@FullVSRef java.lang.String fullVSRef)Gets the group with the specified full VS reference path.VSGroupgetGroupNull(@VSRef java.lang.String path)Gets the group with the specified path.VSGroupgetGroupNull2(@FullVSRef java.lang.String fullVSRef)Gets the group with the specified full VS reference path.VirtualSpacegetNonVirtualized()Gets the non-virtualized instance of this component, i.e.VSParticipantsHoldergetParticipantsHolder()Gets participants holder container.protected voidgetPredefinedProps()Gets potential references to predefined properties for this container.java.util.Map<java.lang.String,java.lang.Object>getPrivateStorageMap()Gets the concurrent hash map used to store the private data.VSTablegetTable(@VSRef java.lang.String path)Gets the table with the specified path.VSTablegetTable2(@FullVSRef java.lang.String fullVSRef)Gets the table with the specified full VS reference path.VSTablegetTableNull(@VSRef java.lang.String path)Gets the table with the specified path.VSTablegetTableNull2(@FullVSRef java.lang.String fullVSRef)Gets the table with the specified full VS reference path.VirtualSpacegetVirtualized()Gets the virtualized instance of this component, i.e.VirtualSpacegetVirtualized(boolean doVirtualize)Gets the virtualized instance of this component, i.e.VirtualSpacegetVirtualizedVirtualSpace(@FullVSRef java.lang.String path)Gets a virtualized VirtualSpace for the application session from this virtualized VirtualSpace.VirtualSpacegetVirtualSpace()Gets the VirtualSpace.<COMP extends IVSComponent>
COMPgetVSComponent(@VSRef java.lang.String path, java.lang.Class<COMP> clazz)Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponent2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz)Gets the VS component with the specified full reference path.<COMP extends IVSComponent>
COMPgetVSComponentNull(@VSRef java.lang.String path, java.lang.Class<COMP> clazz)Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponentNull2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz)Gets the VS component with the specified full reference path.VSReferencegetVSReference(Atom refAtom)Gets the VSReference to this VirtualSpace.protected voidinvokeOnVSActionMethod(VSAction action, GProp<?> trigger, UIComp contextComponent)Invoke the action event method.protected voidinvokeOnVSChangedMethod(IVSComponent component, GProp<?> trigger)Invoke the changed event method.protected voidinvokeOnVSCreateMethod(IVSComponent component)Invoke the create event method.protected voidinvokeOnVSDestroyMethod(IVSComponent component)Invoke the destroy event method.protected voidinvokeOnVSFocusMethod(boolean isFocusGained, IVSComponent component, IVSComponent opposite, IGProp<?> trigger)Invoke the focus event method.protected voidinvokeOnVSStateMethod(IVSComponent component, IVSComponentState.State state, boolean stateValue, GProp<?> trigger)Invoke the state event method.booleanisFree(java.lang.Runnable callback, boolean callbackIfFree, VSComponent component)Verifies if the component is included in a work unit currently in progress in this VirtualSpace.voidonEventSelf(GEvent event)Checks for state change events and fires it to listeners.voidonFocusGained(IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced)Called to the component when it receives focus.voidonFocusLost(IFocusComp focusComp, IGProp<?> trigger, boolean isRemoteInduced)Called to the focused component when it loses focus.booleanonPanelDestroyed(UIPanelBase panel)Called when a panel is destroyed after being virtualized and attached to the VirtualSpace.booleanonPanelVirualized(UIPanelBase panel)Called when a panel has been virtualized.voidonParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)Called when the column changes state.protected voidonPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, java.util.List<java.lang.Throwable> errors)Called when the application is being prepared.protected voidonPropDispose()Called when a property is disposed of by delete/remove in a container, or by the dispose method.voidonRemoteEvent(RemoteEvent event)Called when a remote property event should be processed by this property.protected voidonVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp, boolean isPostResolve)Called when virtualization completed.VirtualSpacevirtualize(IAppSessionGyro appGyro)Call this method to "virtualize" a property tree.protected GProp<?>virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp)Call this method to "virtualize" a property tree.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, 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, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, hasFocus, 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, requestFocus, requestFocusEx, 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, verify, verifyInternalUseOnly, verifyTree
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.prop.ICustomDataProvider
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, getPropBaseReference, 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, 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.IMessageBox
messageBox, messageBox
Methods inherited from interface com.iizix.api.IPrivateStorage
getPrivateData, getPrivateData, setPrivateData
Methods inherited from interface com.iizix.prop.IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, containsProp, containsProp, 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.vs.IVSClassReferenceOwner
getClassReference, getClassReferenceAtom, getClassReferenceImplementsInterface, getClassReferenceRequiredAnnotation, isClassReferenceAnnotationBackReferenceRequired
Methods inherited from interface com.iizix.prop.vs.IVSComponent
getDescription, getVSRef, isEnabled, isEnabledInParent, isReadOnly, isReadOnlyInParent, isSelected, isVisible, isVisibleInParent, messageBox, setEnabled, setEnabled, setIgnoreFocusFromUI, setReadOnly, setReadOnly, setSelected, setSelected, setVirtualizeSupportFocus, setVirtualizeSupportFocus, setVisible, setVisible, shouldIgnoreFocusFromUI
Methods inherited from interface com.iizix.prop.vs.IVSMessageComponent
clearMessage, getMessage, getMessageCategory, getMessageString, isValid, setErrorMessage, setMessage, setMessage
Field Detail
MAP_CLASS_PROP_NAME
public static final java.lang.String MAP_CLASS_PROP_NAME
The focus mapper class property name: "mapClass".- See Also:
- Constant Field Values
participantsHolder
protected VSParticipantsHolder participantsHolder
The participants holder.
Constructor Detail
VirtualSpace
public VirtualSpace()
Creates the VirtualSpace property container without a name. The name must be set in all cases using thesetPropertyAtomcall.
VirtualSpace
public VirtualSpace(Atom propertyAtom)
Creates the VirtualSpace property container with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- the name of the component, unique within it's parent.
Method Detail
getVirtualSpace
public VirtualSpace getVirtualSpace()
Gets the VirtualSpace.- Specified by:
getVirtualSpacein interfaceIVSAccessor- Specified by:
getVirtualSpacein interfaceIVSComponent- Returns:
- This instance.
getVSReference
public VSReference getVSReference(Atom refAtom)
Gets the VSReference to this VirtualSpace.- Specified by:
getVSReferencein interfaceIGProp<GProp<?>[]>- Overrides:
getVSReferencein classPropCnr- Parameters:
refAtom- The reference atom (unused).- Returns:
- A fake VSReference that references this VirtualSpace instance.
createVSReference
public VSReference 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 forVSRelativeReferenceto look up theVSReferenceinstance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnrthat 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,
nullis returned.- Overrides:
createVSReferencein 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
VSReferenceornullif unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.For this method, it's always null!
createVSParticipantsHolder
protected VSParticipantsHolder createVSParticipantsHolder()
Creates a new instance of the VSParticipantsHolder.
addPredefinedProps
protected void addPredefinedProps() throws PropExceptionAdds the predefined properties for this container. This method is called once just after construction of the property container and sometimes population of it.The method should add properties to create or get reference to using the
maybeAddPropmethod. When the PropCnr instance is cloned, the methodgetPredefinedProps()is called in order for the subclass to be able to retrieve the new instances to these properties, if stored in instance variables.- Overrides:
addPredefinedPropsin classPropCnr- Throws:
PropException- for property exceptions.
getPredefinedProps
protected void getPredefinedProps()
Gets potential references to predefined properties for this container. This method is called once just after cloning of the property container.The method should get reference to using the
getProp(...)methods. This allows the subclass to be able to retrieve the new instances to the properties created duringaddPredefinedProps()if stored in instance variables.- Overrides:
getPredefinedPropsin classPropCnr
isFree
public boolean isFree(java.lang.Runnable callback, boolean callbackIfFree, VSComponent component)Verifies if the component is included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.component- The component to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
areFree
public boolean areFree(java.lang.Runnable callback, boolean callbackIfFree, VSComponent... components)Verifies if the component(s) is/are included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.components- The components to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
areFree2
public boolean areFree2(java.lang.Runnable callback, boolean callbackIfFree, VSComponent component, VSComponent... components)Verifies if the components are included in a work unit currently in progress in this VirtualSpace.- Parameters:
callback- The callback to call when work completes, or null for none.callbackIfFree- Performs a call to the callback if free when true.component- A component to verify.components- The components to verify.- Returns:
- true if it's OK to process, false means the component is included in this work unit and if
callbackis non-null, it will be called. Thecallbackis called if free and the flagcallbackIfFreeis true.
onEventSelf
public void onEventSelf(GEvent event)
Checks for state change events and fires it to listeners.- Specified by:
onEventSelfin interfaceIGProp<GProp<?>[]>- Overrides:
onEventSelfin classGProp<GProp<?>[]>- Parameters:
event- The property event.
onParentStateChanged
public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Called when the column changes state.- Specified by:
onParentStateChangedin interfaceIVSComponentListener- Parameters:
parent- The parent who's state was changed.state- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on- New state.
canRequestFocus
public java.lang.String canRequestFocus()
Returns if this component can receive focus. Focus capable components may override to returnnullfor success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusCompinterface, "Not virtualized" if the component is not in a virtualized state, "Component is hidden" ifIVSComponent.isVisible()isfalseor "Component is disabled" ifIVSComponent.isEnabled()isfalse.- Specified by:
canRequestFocusin interfaceIPropCnr- Returns:
nullfocus is possible to this component, or an error message describing why focus cannot be requested.
couldRequestFocusIfVirtualized
public java.lang.String couldRequestFocusIfVirtualized(boolean ignoreStates)
Returns if this component could receive focus if it would be virtualized. Focus capable components may override to returnnullfor success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusCompinterface, "Component is hidden" ifIVSComponent.isVisible()isfalseor "Component is disabled" ifIVSComponent.isEnabled()isfalse.- Specified by:
couldRequestFocusIfVirtualizedin interfaceIPropCnr- Parameters:
ignoreStates- Flag indicating that states should be ignored, such as visible or enabled. If false, hidden or disabled components return an error message.- Returns:
nullfocus is possible to this component, or an error message describing why focus cannot be requested.
onFocusGained
public void onFocusGained(IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced)
Called to the component when it receives focus.Focus components override this method if they need to process focus lost.
- Specified by:
onFocusGainedin interfaceIFocusComp- Parameters:
opposite- Component losing focus, null for none.trigger- The trigger property, null for none.isRemoteInduced- Flag indicating this event is due to a remote event.
onFocusLost
public void onFocusLost(IFocusComp focusComp, IGProp<?> trigger, boolean isRemoteInduced)
Called to the focused component when it loses focus.Focus components override this method if they need to process focus lost.
- Specified by:
onFocusLostin interfaceIFocusComp- Parameters:
focusComp- Component receiving focus, null for none.trigger- The trigger property, null for none.isRemoteInduced- Flag indicating this event is due to a remote event.
onRemoteEvent
public void onRemoteEvent(RemoteEvent event)
Called when a remote property event should be processed by this property.A subclass can override this method to perform appropriate processing and is not required to call
super.onRemoteEvent(e).The onRemoteEvent is NOT called when in a proxied property container, but rather the normal onEventSelf method.
- Specified by:
onRemoteEventin interfaceIGProp<GProp<?>[]>- Overrides:
onRemoteEventin classGProp<GProp<?>[]>- Parameters:
event- The remote event.
forbiddenGetCustomDataMap
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> forbiddenGetCustomDataMap(boolean doCreate)
Deprecated.Gets or creates the provider map. This method is not intended to be called by user code, it is used by the system.Do not call this method!
- Specified by:
forbiddenGetCustomDataMapin interfaceICustomDataProvider- Parameters:
doCreate- Creates the map if required.- Returns:
- The map or newly created map,
nullif not created.Note: the map returned is NOT synchronized thus not thread safe. It is up to the caller to synchronize on it to ensure thread safety.
clone
public VirtualSpace clone()
Clones the property.
virtualize
public VirtualSpace virtualize(IAppSessionGyro appGyro)
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 v, but also virtual instances of panels, for the individual client session. The v 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 v 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.- Throws:
java.lang.NullPointerException- If appGyro is null.
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 v very early in the virtualizing process.
- Overrides:
doVirtualizePropCnrin classPropCnr- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.props- The children properties to virtualize.extendsName- The name in extends to virtualize.virtualSpace- The virtualized or virtualizing v.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.
virtualize
protected GProp<?> virtualize(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp) 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.
- Overrides:
virtualizein classPropCnr- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.virtualSpace- The virtualized VirtualSpace.virtualizedProp- The property being virtualized.- Returns:
- The 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.
getNonVirtualized
public VirtualSpace getNonVirtualized()
Gets the non-virtualized instance of this component, i.e. a VirtualSpace.- Specified by:
getNonVirtualizedin interfaceIVSComponent- Returns:
- The non-virtualized VirtualSpace, always non-null.
getVirtualized
public VirtualSpace getVirtualized()
Gets the virtualized instance of this component, i.e. a VirtualSpace.If this VirtualSpace already is virtualized, the same instance is returned.
If the VirtualSpace in the application session is not virtualized, this method returns
null. Use the methodwithgetVirtualized(boolean)trueas parameter to also perform the virtualization.This method can return null, but not when called from an application session context, i.e. any kind of threads running in the server for an application. This means that you should not require to test for
nullin the code.- Returns:
- The virtualized VirtualSpace, null if Application Session Gyro cannot be found for current thread.
getVirtualized
public VirtualSpace getVirtualized(boolean doVirtualize)
Gets the virtualized instance of this component, i.e. a VirtualSpace.If this VirtualSpace already is virtualized, the same instance is returned.
This method can return null, but not when called from an application session context, i.e. any kind of threads running in the server for an application. This means that you should not require to test for
nullin the code.- Parameters:
doVirtualize- Flag to virtualize the VirtualSpace if not yet virtualized in the application session.- Returns:
- The virtualized VirtualSpace, null if Application Session Gyro cannot be found for current thread.
getAppSessionGyro
public IAppSessionGyro getAppSessionGyro()
Returns the Application Session Gyro instance of this virtualized property.NOTE: Use the code
to get the application session gyro derived from the current thread (and thread group). This will work for all threads in an application session environment in the server.IAppSessionGyro.getSessionInstance()- Specified by:
getAppSessionGyroin interfaceIGProp<GProp<?>[]>- Overrides:
getAppSessionGyroin classGProp<GProp<?>[]>- Returns:
- The Application Session Gyro if this instance is virtualized,
nullotherwise.
getClientSessionGyro
public IClientSessionGyro getClientSessionGyro()
Returns the Client Session Gyro instance.This method calls
to retrieve the instance from the current thread.IClientSessionGyro.getSessionInstance()- Specified by:
getClientSessionGyroin interfaceIGProp<GProp<?>[]>- Overrides:
getClientSessionGyroin classGProp<GProp<?>[]>- Returns:
- The Client Session Gyro if found for the current thread,
nullotherwise.
onPanelVirualized
public boolean onPanelVirualized(UIPanelBase panel)
Called when a panel has been virtualized. Do no call this method, it is intended for the framework.- Parameters:
panel- The panel virtualized.- Returns:
- Success flag.
onPanelDestroyed
public boolean onPanelDestroyed(UIPanelBase panel)
Called when a panel is destroyed after being virtualized and attached to the VirtualSpace.- Parameters:
panel- The panel virtualized being destroyed.- Returns:
- Success flag.
getAttachedVirtualizedPanels
public UIPanelBase[] getAttachedVirtualizedPanels()
Gets the attached panels of this current instance of the VirtualSpace.- Returns:
- The array of panels for all client sessions connected to this VirtualSpace of the same user and app session.
getVirtualizedVirtualSpace
public VirtualSpace getVirtualizedVirtualSpace(@FullVSRef java.lang.String path)
Gets a virtualized VirtualSpace for the application session from this virtualized VirtualSpace. The VirtualSpace to get MUST already have been virtualized prior to this call.- Specified by:
getVirtualizedVirtualSpacein interfaceIVSComponent- Parameters:
path- The path of the VirtualSpace name relative the parent of the current VirtualSpace. This path can be e.g. just a plain name for a direct sibling of this VirtualSpace, a folder based path such as "folder/virtualSpaceB" or a full reference path as "module:/vs/[folderPath/]virtualSpace".- Returns:
- The VirtualSpace with the specified path, never null.
- Throws:
NotFoundException- If the VirtualSpace is not found within the virtualized VirtualSpaces.java.lang.IllegalStateException- If this VirtualSpace is not virtualized or the application session gyro is not found.java.lang.IllegalArgumentException- If path is invalid.
getParticipantsHolder
public VSParticipantsHolder getParticipantsHolder()
Gets participants holder container.
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 ofonPreparecalls is always parent first, the children. The method is called twice, first time withisPostCallset tofalse, then a second time withtrue.- Overrides:
onPreparein classGProp<GProp<?>[]>- 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.
onVirtualizationCompleted
protected void onVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp, boolean isPostResolve)
Called when virtualization completed.This method is called to the entire tree of the newly virtualized property container.
- Overrides:
onVirtualizationCompletedin classGProp<GProp<?>[]>- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.virtualSpace- The virtualized VirtualSpace.virtualizedProp- The property being virtualized.isPostResolve- Flag indicating this call is done after references are attempted to be resolved.
onPropDispose
protected void onPropDispose()
Called when a property is disposed of by delete/remove in a container, or by the dispose method.The Property Container clears the structure of unsent communication requests to clear memory.
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:
onPropDisposein classPropCnr
getFocusHandler
public IVSFocusHandler getFocusHandler()
Returns the instance for the VirtualSpace focus handler.- Returns:
- The instance to use for this VirtualSpace, null for none.
invokeOnVSCreateMethod
protected void invokeOnVSCreateMethod(IVSComponent component)
Invoke the create event method.- Parameters:
component- The VirtualSpace or it's component.
invokeOnVSDestroyMethod
protected void invokeOnVSDestroyMethod(IVSComponent component)
Invoke the destroy event method.- Parameters:
component- The VirtualSpace or it's component.
invokeOnVSActionMethod
protected void invokeOnVSActionMethod(VSAction action, GProp<?> trigger, UIComp contextComponent)
Invoke the action event method.- Parameters:
action- The VS action.trigger- The trigger property.contextComponent- The context component, null for none.
invokeOnVSChangedMethod
protected void invokeOnVSChangedMethod(IVSComponent component, GProp<?> trigger)
Invoke the changed event method.- Parameters:
component- The VS component.trigger- The trigger property.
invokeOnVSFocusMethod
protected void invokeOnVSFocusMethod(boolean isFocusGained, IVSComponent component, IVSComponent opposite, IGProp<?> trigger)Invoke the focus event method.- Parameters:
isFocusGained- Flag for focus gained operation.component- The VS component.opposite- The opposite VS component.trigger- The trigger property.
invokeOnVSStateMethod
protected void invokeOnVSStateMethod(IVSComponent component, IVSComponentState.State state, boolean stateValue, GProp<?> trigger)
Invoke the state event method.- Parameters:
component- The VS component.state- The state.stateValue- The new state.trigger- The trigger property.
getField
public VSField getField(@VSRef java.lang.String path) throws NotFoundException
Gets the field with the specified path.- Specified by:
getFieldin interfaceIVSComponent- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull
public VSField getFieldNull(@VSRef java.lang.String path)
Gets the field with the specified path.- Specified by:
getFieldNullin interfaceIVSComponent- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, null if not found.
getField2
public VSField getField2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException
Gets the field with the specified full VS reference path.- Specified by:
getField2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull2
public VSField getFieldNull2(@FullVSRef java.lang.String fullVSRef)
Gets the field with the specified full VS reference path.It is preferable to use
getField2(String)instead of this method if the field always should be present because it will throw and log errors.- Specified by:
getFieldNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getTable
public VSTable getTable(@VSRef java.lang.String path) throws NotFoundException
Gets the table with the specified path.- Specified by:
getTablein interfaceIVSComponent- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull
public VSTable getTableNull(@VSRef java.lang.String path)
Gets the table with the specified path.- Specified by:
getTableNullin interfaceIVSComponent- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, null if not found.
getTable2
public VSTable getTable2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException
Gets the table with the specified full VS reference path.- Specified by:
getTable2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull2
public VSTable getTableNull2(@FullVSRef java.lang.String fullVSRef)
Gets the table with the specified full VS reference path.It is preferable to use
getTable2(String)instead of this method if the table always should be present because it will throw and log errors.- Specified by:
getTableNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getAction
public VSAction getAction(@VSRef java.lang.String path) throws NotFoundException
Gets the action with the specified path.- Specified by:
getActionin interfaceIVSComponent- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull
public VSAction getActionNull(@VSRef java.lang.String path)
Gets the action with the specified path.- Specified by:
getActionNullin interfaceIVSComponent- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, null if not found.
getAction2
public VSAction getAction2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException
Gets the action with the specified full VS reference path.- Specified by:
getAction2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull2
public VSAction getActionNull2(@FullVSRef java.lang.String fullVSRef)
Gets the action with the specified full VS reference path.It is preferable to use
getAction2(String)instead of this method if the action always should be present because it will throw and log errors.- Specified by:
getActionNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, null if not found.
getGroup
public VSGroup getGroup(@VSRef java.lang.String path) throws NotFoundException
Gets the group with the specified path.- Specified by:
getGroupin interfaceIVSComponent- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, never null.
- Throws:
NotFoundException- If the action is not found.
getGroupNull
public VSGroup getGroupNull(@VSRef java.lang.String path)
Gets the group with the specified path.It is preferable to use
getGroup(String)instead of this method if the group always should be present because it will throw and log errors.- Specified by:
getGroupNullin interfaceIVSComponent- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, null if not found.
getGroup2
public VSGroup getGroup2(@FullVSRef java.lang.String fullVSRef) throws NotFoundException
Gets the group with the specified full VS reference path.- Specified by:
getGroup2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, never null.
- Throws:
NotFoundException- If the group is not found.
getGroupNull2
public VSGroup getGroupNull2(@FullVSRef java.lang.String fullVSRef)
Gets the group with the specified full VS reference path.It is preferable to use
getGroup2(String)instead of this method if the group always should be present because it will throw and log errors.- Specified by:
getGroupNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full VS reference to the group the VirtualSpace, as "module:/vs/path".- Returns:
- The group, null if not found.
getVSComponent
public <COMP extends IVSComponent> COMP getVSComponent(@VSRef java.lang.String path, java.lang.Class<COMP> clazz) throws NotFoundException
Gets the VS component with the specified path.- Specified by:
getVSComponentin interfaceIVSComponent- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull
public <COMP extends IVSComponent> COMP getVSComponentNull(@VSRef java.lang.String path, java.lang.Class<COMP> clazz)
Gets the VS component with the specified path.- Specified by:
getVSComponentNullin interfaceIVSComponent- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVSComponent2
public <COMP extends IVSComponent> COMP getVSComponent2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz) throws NotFoundException
Gets the VS component with the specified full reference path.- Specified by:
getVSComponent2in interfaceIVSComponent- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull2
public <COMP extends IVSComponent> COMP getVSComponentNull2(@FullVSRef java.lang.String fullVSRef, java.lang.Class<COMP> clazz)
Gets the VS component with the specified full reference path.- Specified by:
getVSComponentNull2in interfaceIVSComponent- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getPrivateStorageMap
public java.util.Map<java.lang.String,java.lang.Object> getPrivateStorageMap()
Gets the concurrent hash map used to store the private data.- Specified by:
getPrivateStorageMapin interfaceIPrivateStorage- Returns:
- The private storage map.