Class KStringHolderProp<PROP_VALUE>
java.lang.Object
com.iizix.prop.GProp<PROP_VALUE>
com.iizix.prop.KStringHolderProp<PROP_VALUE>
- Type Parameters:
PROP_VALUE- The property value class (KString,KTooltip,GBadge).
- All Implemented Interfaces:
EventListener, IGProp<PROP_VALUE>, IReferencingGProp, IKStringHolder<PROP_VALUE>, IKStringInfoProvider, IKStringValuePropHolder<PROP_VALUE>, ITextExternalizableProp<PROP_VALUE>, Cloneable
- Direct Known Subclasses:
BadgeProp, KStringProp, TooltipProp
public abstract class KStringHolderProp<PROP_VALUE> extends GProp<PROP_VALUE> implements IKStringValuePropHolder<PROP_VALUE>
The property that holds a value built around a
KString: what KStringProp, the tooltip property and BadgeProp share. It owns the KStringHolder that resolves the string's references, and it implements once the behaviour the three concrete classes used to carry each: the holder's life cycle (creation, clone, dispose), the resolve triggers (value change, container renamed, moved or added, the post-order reference event), the hyperlink remote event, the Designer's refactoring rebuild and the verification. A change to how a KString lives inside a property is made here, once.A concrete class supplies where the KString sits inside its value (IKStringHolder.getKString()), how its value is cloned and disposed of, the location name of its verification errors, its value classes, its XML and its wire. The concrete class names are unchanged: base-properties.xml and the JavaScript client never notice this class.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class 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_ATTR_STRING_SECRET, PROP_USER_1, PROP_USER_2Fields inherited from interface IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EQC_SAVE_RELEVANT_ONLY, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEConstructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a property with no name and with a null value.protectedKStringHolderProp(Atom propertyAtom) Creates a property with the specified name with a null value.Method Summary
Modifier and TypeMethodDescriptionclone()Clones the property and its KString holder.protected abstract PROP_VALUEclonePropValue(PROP_VALUE value) Clones a property value forclone().protected abstract voiddisposePropValue(PROP_VALUE value) Disposes of a property value when the property is disposed of.protected final KStringHolderGets the KString holder.protected abstract StringGets the location name used for the KString verification errors of this property.voidonEventSelf(GEvent event) Called when a property event is send to this property: a value change, or the container being renamed, moved or added, resolves the KString references.voidonKStringRefactored(KStringHolder holder, GEvent triggerEvent) Called when a KString tag changed due to refactoring.protected voidCalled when disposed of: the holder first (it disposes of the KString it holds), then the value.protected voidonPropValueSet(Object oldValue) Called when the property value has been set: the holder is told about the new KString.protected voidCalled to perform reference resolving, in POST-order.voidonRemoteEvent(RemoteEvent event) Processes remote hyperlink events.voidresolveKStrings(boolean doReCheck, GEvent triggerEvent) Resolves the references to KString's in all held KString's.booleanverify(PropVerification verification) Verifies this property: the KString references first, then the property itself.Methods inherited from class GProp
addPropError, addPropListener, appendProp, appendPropValue, convertPropError, dispose, equals, equals, equalsErrors, 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, getPropValue0, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hashCode, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, initializeProp, initializeValue, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropErrorPersisted, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropForEditorAtCreation, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropSaveRelevant, isPropSecret, isPropSecretCapable, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onInitialize, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onVirtualizationCompleted, paramString, 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, setPropSecret, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toNativeValue0, toShortString, toShortString, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, virtualize, warning, warning, warningMethods inherited from interface IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onPropTreeInitialized, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, warning, warning, warningMethods inherited from interface IKStringHolder
getDirectReferencedTargetSet, getKString, isReferencingMultipleTargetsMethods inherited from interface IKStringInfoProvider
installFontsMethods inherited from interface IKStringValuePropHolder
doAddReference, getDPR, getExternalizableKString, getHTTPServer, getImageTarget, getResolveReferenceProperty, getResourcePrefix, getTargetLanguageCode, getWebServerRoot, installFont, installFonts, shouldResolveMethods inherited from interface IReferencingGProp
getDirectReferencedTarget, getParent, getReferenceType, getReferencingOwnerMethods inherited from interface ITextExternalizableProp
createNewPropValue
Constructor Details
KStringHolderProp
protected KStringHolderProp()Creates a property with no name and with a null value.KStringHolderProp
Creates a property with the specified name with a null value.- Parameters:
propertyAtom- the property atom.
Method Details
getKStringHolder
Gets the KString holder.- Returns:
- The holder, or null once the property is disposed of.
clone
Clones the property and its KString holder. The clone gets a holder of its own and its value is set anew from a clone of the value, so that the new holder sees the string and resolves it.- Overrides:
clonein classGProp<PROP_VALUE>- Returns:
- A new cloned instance.
clonePropValue
Clones a property value forclone().- Parameters:
value- The value to clone, never null.- Returns:
- The cloned value.
disposePropValue
Disposes of a property value when the property is disposed of.- Parameters:
value- The value, never null.
getKStringVerificationLocation
Gets the location name used for the KString verification errors of this property.- Returns:
- "KString", "Tooltip" or "Badge".
onPropValueSet
Called when the property value has been set: the holder is told about the new KString. A subclass that overrides this method must callsuper.onPropValueSet(oldValue).- Overrides:
onPropValueSetin classGProp<PROP_VALUE>- Parameters:
oldValue- The old value.
onEventSelf
Called when a property event is send to this property: a value change, or the container being renamed, moved or added, resolves the KString references.A subclass can override this method to perform appropriate processing and is not required to call
super.onEventSelf(e).- Specified by:
onEventSelfin interfaceIGProp<PROP_VALUE>- Overrides:
onEventSelfin classGProp<PROP_VALUE>- Parameters:
event- The property event.
onReferenceEvent
Called to perform reference resolving, in POST-order.- Overrides:
onReferenceEventin classGProp<PROP_VALUE>- Parameters:
event- The resolve references event.
resolveKStrings
Resolves the references to KString's in all held KString's.- Specified by:
resolveKStringsin interfaceIKStringHolder<PROP_VALUE>- Parameters:
doReCheck- Re-check flag.triggerEvent- The triggering property event.
onPropDispose
protected void onPropDispose()Called when disposed of: the holder first (it disposes of the KString it holds), then the value.- Overrides:
onPropDisposein classGProp<PROP_VALUE>
onRemoteEvent
Processes remote hyperlink events.- Specified by:
onRemoteEventin interfaceIGProp<PROP_VALUE>- Overrides:
onRemoteEventin classGProp<PROP_VALUE>- Parameters:
event- The remote event.
onKStringRefactored
Called when a KString tag changed due to refactoring. The property value is rebuilt around the refactored KString throughITextExternalizableProp.createNewPropValue(KString)and set with the triggering property. This event is fired only in the Designer.- Specified by:
onKStringRefactoredin interfaceIKStringHolder<PROP_VALUE>- Parameters:
holder- The KStringHolder instance.triggerEvent- Event that triggered the refactoring.
verify
Verifies this property: the KString references first, then the property itself.- Specified by:
verifyin interfaceIGProp<PROP_VALUE>- Overrides:
verifyin classGProp<PROP_VALUE>- Parameters:
verification- The property verification class.- Returns:
- true if verification should proceed, false if disposed of and verification should not take place.