Class VSRelativeReference<TARGET extends VSComponent>
- All Implemented Interfaces:
- EventListener,- IGProp<String>,- IPropReference,- IReferencingGProp,- Cloneable
- Direct Known Subclasses:
- VSActionReference,- VSColumnReference,- VSComponentReference,- VSFieldReference,- VSFocusReference,- VSGroupReference,- VSOnUIEvent,- VSTableColumnReference,- VSTableReference
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from interface com.iizix.prop.IPropReference- IPropReference.IRefType, IPropReference.ReferenceChangeEvent, IPropReference.RefType
- Field SummaryFieldsModifier and TypeFieldDescription- protected TARGETThe current target reference.- protected TARGETThe current target reference.- protected PropReferenceThe instance of the property reference.- protected StringThe current VSReference base.- Fields inherited from class com.iizix.prop.GProp- GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2- Fields inherited from interface com.iizix.prop.IGProp- EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
- Constructor SummaryConstructorsConstructorDescriptionCreates a VirtualSpace Reference property with no name and with a null value.- VSRelativeReference- (Atom propertyAtom) Creates a VirtualSpace Reference property with the specified name with a null value.- VSRelativeReference- (Atom propertyAtom, String newValue) Creates a VirtualSpace Reference property with the specified name and value.
- Method SummaryModifier and TypeMethodDescription- protected final voidAdds an error.- protected final voidClears the error.- clone()Overrides clone to clear existing reference.- protected void- createReference- (GEvent event) Creates the reference.- protected voidDisposes and clears the reference.- protected boolean- equalsErrors- (PropError pe1, PropError pe2, int how) Processes error property verification.Gets the class wanted.Gets the full reference string.- abstract IPropReference.IRefTypeGets the reference Type.- final TARGETGets the target VS component.- protected booleanCalled upon creation of the property to check it's private state.- boolean- isReferenceValid- (GProp<?> property) Validates the property reference that has been looked up.- final void- onEventSelf- (GEvent event) Called when a property event is send to this property.- protected voidProperty disposed of: dispose of reference.- protected final void- onPropParentChanged- (PropCnr oldParent, PropCnr newParent) The parent has been changed, if added to a container or moved, recheck the reference.- protected voidCalled to perform reference resolving.- void- onReferenceEvent- (PropReference reference, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent) Called when a property reference event occurs.- protected abstract voidCalled when the property reference has been disposed of e.g.- protected abstract void- onResolved- (TARGET target) Called when the property reference has been resolved.- protected void- onVirtualizationCompleted- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.- protected void- onVSReferenceChanged- (GEvent event) Rechecks the reference, the VSReference has changed.- protected StringReturns the parameter string representing the state of this event.- voidResolves the reference.- protected final void- resolve- (PropReference ref, boolean doReCheck, GEvent event) Resolves the reference.- protected voidSets as invalid.- protected final void- targetChanged- (GProp<?> prop) Internal method called when target changes.- protected VSRelativeReference<TARGET>- virtualize- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) Call this method to "virtualize" a property tree.- Methods inherited from class com.iizix.prop.StringProp- appendPropValue, getPropValue0, getString, getString, getValueClasses, initializeValue, setPropValue, toNativeValue0, validatePropType- Methods inherited from class com.iizix.prop.GProp- addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsObj, equalsPropValue, equalsTree, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, initializeProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropInvalidateCache, onPropTreeInitialized, onPropValueSet, onRemoteEvent, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, warning, warning, warning- Methods inherited from class java.lang.Object- getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.prop.IReferencingGProp- getDirectReferencedTarget, getDirectReferencedTargetSet, getParent, getReferencingOwner, isReferencingMultipleTargets
- Field Details- referenceThe instance of the property reference.
- vsRefBaseThe current VSReference base.
- currentTargetThe current target reference.
- fixedTargetThe current target reference. This reference may be virtualized or not depending on if this reference is located in the VirtualSpace being virtualized (not probable), or if it's located in e.g. a panel that is virtualized caused by a VirtualSpace. This instance is then kept as long as the reference string is not changed. If it is changed, this relative-reference-property reverts back to non-fixed mode.
 
- Constructor Details- VSRelativeReferencepublic VSRelativeReference()Creates a VirtualSpace Reference property with no name and with a null value.
- VSRelativeReferenceCreates a VirtualSpace Reference property with the specified name with a null value.- Parameters:
- propertyAtom- the property atom.
 
- VSRelativeReferenceCreates a VirtualSpace Reference property with the specified name and value.- Parameters:
- propertyAtom- the property atom.
- newValue- the new string value for the property.
 
 
- Method Details- isPropPrivateAtCreationprotected boolean isPropPrivateAtCreation()Called upon creation of the property to check it's private state. This is used by properties that are not distributed to the remote party.- Overrides:
- isPropPrivateAtCreationin class- GProp<String>
- Returns:
- true, always.
 
- disposeReferenceprotected void disposeReference()Disposes and clears the reference.
- onPropDisposeprotected void onPropDispose()Property disposed of: dispose of reference.- Overrides:
- onPropDisposein class- GProp<String>
 
- cloneOverrides clone to clear existing reference.- Overrides:
- clonein class- StringProp
- Returns:
- A new cloned String property.
 
- virtualizeprotected VSRelativeReference<TARGET> virtualize- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace) throws 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 class- GProp<String>
- Parameters:
- appGyro- The application gyro instance performing the virtualization.
- clientGyro- The client gyro session, can be- nullif not initialized from the client gyro.
- virtualSpace- The virtualized VirtualSpace.
- Returns:
- The virtualized property.
- Throws:
- CloneNotSupportedException- If a subclass doesn't allow cloning, e.g. the client properties.
- PropException- For property errors during the virtualization.
- IllegalStateException- IllegalStateException if the property is in an invalid state, e.g. in virtualizing state or if in
 
- equalsErrorsProcesses error property verification. The default processing is to verify the two error properties- pe1and- pe2for equality if- includeErrorsis 0 or 1, and returns true if the value is 2=no comparison with error properties.- Override to verify property errors for reference properties. - Overrides:
- equalsErrorsin class- GProp<String>
- Parameters:
- pe1- The first error property, may be null.
- pe2- The second error property, may be null.
- how- Flags EQC_* values for equal checking.
- Returns:
- Equality flag depending on includeErrorsvalue.
 
- onEventSelfCalled when a property event is send to this property.- A subclass can override this method to perform appropriate processing and is not required to call - super.onEventSelf(e).- Specified by:
- onEventSelfin interface- IGProp<TARGET extends VSComponent>
- Overrides:
- onEventSelfin class- GProp<String>
- Parameters:
- event- The property event.
 
- onReferenceEventCalled to perform reference resolving. A property should override this method if it needs to perform reference resolving and validation.- Subclasses override this method and only subclasses extending - PropCnrneeds to call- super.onReferenceEvent(ResolveReferenceEvent event).- Overrides:
- onReferenceEventin class- GProp<String>
- Parameters:
- event- The resolve references event.
 
- onPropParentChangedThe parent has been changed, if added to a container or moved, recheck the reference.- Overrides:
- onPropParentChangedin class- GProp<String>
- Parameters:
- oldParent- The old parent (or null if none).
- newParent- The new parent (or null if none).
 
- resolveResolves the reference.- Parameters:
- doReCheck- Performs a re-check in case e.g. reference class type changes.
- event- The triggering event, null for none.
 
- getReferenceGets the full reference string.- Returns:
- The full reference string, or another reference string for failure in case it cannot be retrieved, or null for no reference defined.
 
- onVSReferenceChangedRechecks the reference, the VSReference has changed.
- setInvalidprotected void setInvalid()Sets as invalid.
- createReferenceCreates the reference.
- resolveResolves the reference.
- onReferenceEventpublic void onReferenceEvent- (PropReference reference, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent) Called when a property reference event occurs. The events are ReferenceChangeEvent.FOUND, FOUND_WRONG_CLASS, RENAMED, MOVED, NEW_PROPERTY, BROKEN.- Specified by:
- onReferenceEventin interface- IPropReference
- Parameters:
- reference- The property reference object.
- event- The event.
- triggerEvent- The event that triggered this reference event, null for none.
 
- clearErrorprotected final void clearError()Clears the error.
- addErrorAdds an error.
- targetChangedInternal method called when target changes.
- getVSTargetGets the target VS component.- Returns:
- The target resolved, null for none (or not a valid reference).
 
- isReferenceValidValidates the property reference that has been looked up. Override to provide additional functionality than checking for property class type matching with- getPropertyClass()- Specified by:
- isReferenceValidin interface- IPropReference
- Parameters:
- property- The property to validate.
- Returns:
- true if valid, false otherwise.
 
- onVirtualizationCompletedprotected void onVirtualizationCompleted- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.- This method is called to the entire tree of the newly virtualized property container. - Overrides:
- onVirtualizationCompletedin class- GProp<String>
- Parameters:
- appGyro- The application gyro instance performing the virtualization.
- clientGyro- The client gyro session, can be- nullif not initialized from the client gyro.
- virtualSpace- The virtualized VirtualSpace.
- isPostResolve- Flag indicating this call is done after references are attempted to be resolved.
 
- paramStringReturns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.- Overrides:
- paramStringin class- GProp<String>
- Returns:
- the parameter string of this event.
 
- getPropertyClassGets the class wanted.
- getReferenceTypeGets the reference Type.- Specified by:
- getReferenceTypein interface- IPropReference
- Specified by:
- getReferenceTypein interface- IReferencingGProp
- Returns:
- The reference type, generally a value from the enum IPropReference.RefType, otherwise a static final implementation of the reference type with locale support.
 
- onResolvedCalled when the property reference has been resolved.- Parameters:
- target- The target reference.
 
- onRemovedCalled when the property reference has been disposed of e.g. due to new reference or pure disposal of this property.- Parameters:
- oldTarget- The old target reference.