Package com.iizix.text
Class KStringHTMLTextVirtualSpaceTag
- All Implemented Interfaces:
IKStringTextTag
,Cloneable
public class KStringHTMLTextVirtualSpaceTag extends KStringHTMLDynamicTag<VSField> implements IKStringTextTag
Class for the dynamic HTML tag IZ that refers to VirtualSpace text.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class com.iizix.text.KStringTag
KStringTag.Type
Field Summary
Fields inherited from class com.iizix.text.KStringHTMLTag
isClosed, ordinal
Constructor Summary
ConstructorDescriptionKStringHTMLTextVirtualSpaceTag
(int position, int ordinal, LinkedHashMap<String, String> attributes, String inputString, int parsePosition) Creates a VirtualSpace text tag and resolves the name attribute.Method Summary
Modifier and TypeMethodDescriptiongetHTMLString
(StringBuilder useme, IKStringInfoProvider provider) Gets the string representation of this tag in the HTML format.getPLAINString
(StringBuilder useme, IKStringInfoProvider provider) Gets the string representation of this tag in the PLAIN format, i.e.getPLAINTagText
(StringBuilder useme) Gets the "unparsed" string representation of this tag in the PLAIN format, i.e.Gets the reference.Class<?>
Returns the reference class used by this tag, e.g.boolean
isRefreshRequired
(GEvent event, VSField field) Upon a property event received on the target reference property (or its children), this method verifies if the event would affect the KString contents needing to be refreshed.boolean
setReference
(String ref) Updates the reference for the tag.boolean
Checks if this string will lose formatting when translated to PLAIN.Methods inherited from class com.iizix.text.KStringHTMLDynamicTag
getHTMLTagText, isReferenceTag
Methods inherited from class com.iizix.text.KStringHTMLTag
create, disposeTagReference, equalsName, resolve
Methods inherited from class com.iizix.text.KStringTag
appendHTMLAttributes, appendHTMLAttributes, appendHTMLAttributesSkip, appendPLAINAttributes, appendPLAINValue, clone, equals, getAttribute, getReferenceError, getReferenceType, getSourceEndPosition, getSourceLength, getSourcePosition, getType, isReferenceValid, isRefreshRequired, setAttribute, setSourceLocation, verify
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.iizix.text.IKStringTextTag
getAttribute, getSourceEndPosition, getSourcePosition, getType, setAttribute
Constructor Details
KStringHTMLTextVirtualSpaceTag
public KStringHTMLTextVirtualSpaceTag(int position, int ordinal, LinkedHashMap<String, String> attributes, String inputString, int parsePosition) throws KStringParseExceptionCreates a VirtualSpace text tag and resolves the name attribute. The "format" attributes is also retrieved.- Parameters:
position
- The position of the tag in the parsed string.attributes
- The tag attributes.inputString
- The input string to KString.parsePosition
- The parsing position where tag starts.- Throws:
KStringParseException
- For missing attributes.
Method Details
getReference
Gets the reference.- Specified by:
getReference
in interfaceIKStringTextTag
- Specified by:
getReference
in classKStringHTMLDynamicTag<VSField>
- Returns:
- The reference string to the property.
setReference
Updates the reference for the tag.- Specified by:
setReference
in interfaceIKStringTextTag
- Overrides:
setReference
in classKStringHTMLTag<VSField>
- Parameters:
ref
- The new reference string.- Returns:
- true for changed, false for no change.
getReferenceClass
Returns the reference class used by this tag, e.g. KStringProp for text table, or the image class IImageTarget.class.- Overrides:
getReferenceClass
in classKStringTag<VSField>
- Returns:
- VSField.class.
willLoseFormatting
public boolean willLoseFormatting()Checks if this string will lose formatting when translated to PLAIN. Note that translating PLAIN to HTML never loses formatting.- Specified by:
willLoseFormatting
in classKStringHTMLDynamicTag<VSField>
- Returns:
- Always false.
getPLAINTagText
Gets the "unparsed" string representation of this tag in the PLAIN format, i.e. this HTML tag will reformat or translate itself for PLAIN. For the basic HTML tags, this results in an empty string.- Specified by:
getPLAINTagText
in classKStringHTMLDynamicTag<VSField>
getPLAINString
Gets the string representation of this tag in the PLAIN format, i.e. returns empty string.- Specified by:
getPLAINString
in classKStringHTMLDynamicTag<VSField>
- Parameters:
useme
- Temporary StringBuilder for any use.provider
- The information provider or null for none.
getHTMLString
Gets the string representation of this tag in the HTML format. Method needs to be overridden for IZ that replaces the entire tag with an HTML string.- Overrides:
getHTMLString
in classKStringHTMLDynamicTag<VSField>
- Parameters:
useme
- Temporary StringBuilder for any use.provider
- The information provider or null for none.
isRefreshRequired
Upon a property event received on the target reference property (or its children), this method verifies if the event would affect the KString contents needing to be refreshed.- Overrides:
isRefreshRequired
in classKStringTag<VSField>
- Parameters:
event
- The event.field
- The target property for the tag.- Returns:
- true to refresh the KString, false not to.