Package com.iizix.text
Class KStringHTMLDynamicTag<TARGET>
java.lang.Object
com.iizix.text.KStringTag<TARGET>
com.iizix.text.KStringHTMLTag<TARGET>
com.iizix.text.KStringHTMLDynamicTag<TARGET>
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- KStringHTMLHyperlinkExternalTag,- KStringHTMLHyperlinkResourceTag,- KStringHTMLHyperlinkUITag,- KStringHTMLHyperlinkVSTag,- KStringHTMLImageTag,- KStringHTMLTextTableTag,- KStringHTMLTextVirtualSpaceTag
Class for the dynamic HTML tags in the string, i.e. the HTML tags A, IMG and IZ corresponding to Hyperlink, Image, iiziTags (text table, VirtualSpace and Connector) respectively.
- 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 SummaryConstructorsConstructorDescription- KStringHTMLDynamicTag- (KStringTag.Type type, int position, int ordinal, LinkedHashMap<String, - String> attributes) Creates a normal tag.
- Method SummaryModifier and TypeMethodDescription- getHTMLString- (StringBuilder useme, IKStringInfoProvider provider) Gets the string representation of this tag in the HTML format.- final String- getHTMLTagText- (StringBuilder useme, IKStringInfoProvider provider) Gets the "unparsed" string representation of this tag in the HTML format.- abstract String- getPLAINString- (StringBuilder useme, IKStringInfoProvider provider) Gets the string representation of this tag in the PLAIN format, i.e.- abstract String- getPLAINTagText- (StringBuilder useme) Gets the "unparsed" string representation of this tag in the PLAIN format, i.e.- abstract StringGets the reference of this tag.- final booleanChecks if this tag is of reference type, i.e.- abstract booleanChecks if this string will lose formatting when translated to PLAIN.- Methods inherited from class com.iizix.text.KStringHTMLTag- create, disposeTagReference, equalsName, resolve, setReference- Methods inherited from class com.iizix.text.KStringTag- appendHTMLAttributes, appendHTMLAttributes, appendHTMLAttributesSkip, appendPLAINAttributes, appendPLAINValue, clone, equals, getAttribute, getReferenceClass, getReferenceError, getReferenceType, getSourceEndPosition, getSourceLength, getSourcePosition, getType, isReferenceValid, isRefreshRequired, isRefreshRequired, setAttribute, setSourceLocation, verify
- Constructor Details- KStringHTMLDynamicTagpublic KStringHTMLDynamicTag- (KStringTag.Type type, int position, int ordinal, LinkedHashMap<String, - String> attributes) Creates a normal tag.- Parameters:
- type- The tag type.
- position- The position of the tag in the parsed string.
- attributes- The tag attributes.
 
 
- Method Details- isReferenceTagpublic final boolean isReferenceTag()Checks if this tag is of reference type, i.e. for HTML, the tags A, IMG, IZ. For PLAIN KString type, this method always returns true.- Overrides:
- isReferenceTagin class- KStringHTMLTag<TARGET>
 
- getReferenceGets the reference of this tag.- Overrides:
- getReferencein class- KStringTag<TARGET>
- Returns:
- The reference, or null for none.
 
- willLoseFormattingpublic abstract boolean willLoseFormatting()Checks if this string will lose formatting when translated to PLAIN. Note that translating PLAIN to HTML never loses formatting.- Overrides:
- willLoseFormattingin class- KStringHTMLTag<TARGET>
- Returns:
- Always true for opened tags.
 
- getPLAINTagTextGets 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.- Overrides:
- getPLAINTagTextin class- KStringHTMLTag<TARGET>
 
- getHTMLTagTextGets the "unparsed" string representation of this tag in the HTML format.- Overrides:
- getHTMLTagTextin class- KStringHTMLTag<TARGET>
- Parameters:
- useme- Temporary StringBuilder for any use.
- provider- The information provider or null for none.
 
- getPLAINStringGets the string representation of this tag in the PLAIN format, i.e. returns empty string.- Overrides:
- getPLAINStringin class- KStringHTMLTag<TARGET>
- Parameters:
- useme- Temporary StringBuilder for any use.
- provider- The information provider or null for none.
 
- getHTMLStringGets 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:
- getHTMLStringin class- KStringHTMLTag<TARGET>
- Parameters:
- useme- Temporary StringBuilder for any use.
- provider- The information provider or null for none.