Package com.iizix.text
Class KStringHolder
java.lang.Object
com.iizix.text.KStringHolder
- All Implemented Interfaces:
- EventListener
Helper class used to maintain a KString for its dynamic tags with references, i.e. the image, text table, VirtualSpace and Connector tags.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- classClass that holds and maintains the reference for a tag.
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- KStringHolder- (IKStringHolder<?> holder) Constructor for a holder of a single KString.
- Method SummaryModifier and TypeMethodDescription- voidDisposes of the instance and the KString and removes property listener.Gets the refactored KString.- protected booleanVerifies if the tree is valid for reference creation, i.e.- voidCalled when a property event is send to the holder property.- protected voidCalled to perform reference resolving.- voidResolves the references.- voidResolves the references in the KString if required before sending it to the remote party.- void- setKString- (KString ks) Called when a KString is assigned in the holder.- void- verify- (PropVerification verification, String location) Called when a KString requires verification of the references due to broken or valid references.
- Field Details- BASE_ERROR_IDThe error ID base.- See Also:
 
 
- Constructor Details- KStringHolderConstructor for a holder of a single KString.- Parameters:
- holder- The holder property.
- Throws:
- NullPointerException- If the holder is null.
 
 
- Method Details- disposeHolderpublic void disposeHolder()Disposes of the instance and the KString and removes property listener. Disposal can be done followed by calling setKString() with a new KString.
- setKStringCalled when a KString is assigned in the holder.- Parameters:
- ks- The KString, or null for none (same as calling dispose() method).
 
- getRefactoredKStringGets the refactored KString.- The returned instance is of the same type, i.e. if a PlainKString is the original string, this will also be the return from this call. - Returns:
- The refactored KString, or null if this instance is disposed of.
 
- resolveResolves the references.- Parameters:
- doReCheck- Re-check flag.
- triggerEvent- The triggering property event.
 
- resolveBeforeSendpublic void resolveBeforeSend()Resolves the references in the KString if required before sending it to the remote party. The reference tree is assumed valid.
- isReferenceTreeValidprotected boolean isReferenceTreeValid()Verifies if the tree is valid for reference creation, i.e. that there is a valid Property Manager owning the root. This method can be overridden in order for references not to be created for the particular configuration (e.g. Client-related references such as LabelForReference that does not create references when communicating).- Returns:
- true if the root property manager is found, false otherwise.
 
- onEventCalled when a property event is send to the holder property.- Specified by:
- onEventin interface- EventListener
- 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).- Parameters:
- event- The resolve references event.
 
- verifyCalled when a KString requires verification of the references due to broken or valid references. This event is fired only in the Designer.- Parameters:
- verification- The property verification class.
- location- The location.