Package com.iizix.text
Class KStringHTMLHyperlinkVSTag
- java.lang.Object
- com.iizix.text.KStringTag<TARGET>
- com.iizix.text.KStringHTMLTag<TARGET>
- com.iizix.text.KStringHTMLDynamicTag<IVSComponent>
- com.iizix.text.KStringHTMLHyperlinkVSTag
- All Implemented Interfaces:
IKStringHTMLHyperlink
,java.lang.Cloneable
public class KStringHTMLHyperlinkVSTag extends KStringHTMLDynamicTag<IVSComponent> implements IKStringHTMLHyperlink
Class for the dynamic HTML hyperlink A tag that refers to VirtualSpace when the user clicks on a hyperlink in HTML 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
Constructors Constructor Description KStringHTMLHyperlinkVSTag(int position, int ordinal, java.util.LinkedHashMap<java.lang.String,java.lang.String> attributes, java.lang.String inputString, int parsePosition)
Creates a VirtualSpace hyperlink tag and resolves the name attribute.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHTMLString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
Gets the string representation of this tag in the HTML format.java.lang.String
getPLAINString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
Gets the string representation of this tag in the PLAIN format, i.e.java.lang.String
getPLAINTagText(java.lang.StringBuilder useme)
Gets the "unparsed" string representation of this tag in the PLAIN format, i.e.java.lang.String
getReference()
Gets the reference of this tag.java.lang.Class<?>
getReferenceClass()
Returns the reference class used by this tag, e.g.boolean
setReference(java.lang.String ref)
Sets the "ref" VS reference.void
setTarget(java.lang.String target)
Sets the target reference, if supported.boolean
willLoseFormatting()
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, getReferenceDescription, getReferenceError, getSourceEndPosition, getSourceLength, getSourcePosition, getType, isReferenceValid, isRefreshRequired, 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.IKStringHTMLHyperlink
getAttribute, getSourceEndPosition, getSourcePosition, getType, setAttribute
Constructor Detail
KStringHTMLHyperlinkVSTag
public KStringHTMLHyperlinkVSTag(int position, int ordinal, java.util.LinkedHashMap<java.lang.String,java.lang.String> attributes, java.lang.String inputString, int parsePosition) throws KStringParseException
Creates a VirtualSpace hyperlink tag and resolves the name attribute.- 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 Detail
setTarget
public void setTarget(java.lang.String target)
Sets the target reference, if supported.- Specified by:
setTarget
in interfaceIKStringHTMLHyperlink
- Parameters:
target
- The new target.
setReference
public boolean setReference(java.lang.String ref)
Sets the "ref" VS reference.- Specified by:
setReference
in interfaceIKStringHTMLHyperlink
- Overrides:
setReference
in classKStringHTMLTag<IVSComponent>
- Parameters:
ref
- The VS reference.- Returns:
- true for changed, false for no change.
getReference
public java.lang.String getReference()
Gets the reference of this tag.- Specified by:
getReference
in classKStringHTMLDynamicTag<IVSComponent>
- Returns:
- The reference, or null for none.
getReferenceClass
public java.lang.Class<?> 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<IVSComponent>
- Returns:
- IVSComponent.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<IVSComponent>
- Returns:
- Always true.
getPLAINTagText
public java.lang.String getPLAINTagText(java.lang.StringBuilder useme)
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<IVSComponent>
- Parameters:
useme
- Temporary StringBuilder for any use.- Returns:
- Empty string always: there is no conversion possible.
getPLAINString
public java.lang.String getPLAINString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
Gets the string representation of this tag in the PLAIN format, i.e. returns empty string.- Specified by:
getPLAINString
in classKStringHTMLDynamicTag<IVSComponent>
- Parameters:
useme
- Temporary StringBuilder for any use.provider
- The information provider or null for none.- Returns:
- Empty string always: no contents for this tag.
getHTMLString
public java.lang.String getHTMLString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
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.- Specified by:
getHTMLString
in interfaceIKStringHTMLHyperlink
- Overrides:
getHTMLString
in classKStringHTMLDynamicTag<IVSComponent>
- Parameters:
useme
- Temporary StringBuilder for any use.provider
- The information provider or null for none.- Returns:
- The HTML string.