Package com.iizix.text
Class KStringHTMLHyperlinkResourceTag
java.lang.Object
- All Implemented Interfaces:
IKStringHTMLHyperlink,Cloneable
public class KStringHTMLHyperlinkResourceTag extends KStringHTMLDynamicTag<FileURIPropCnr> implements IKStringHTMLHyperlink
Class for the dynamic HTML hyperlink A tag that refers to a Resource 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.TypeField Summary
Fields inherited from class com.iizix.text.KStringHTMLTag
isClosed, ordinalConstructor Summary
ConstructorsConstructorDescriptionKStringHTMLHyperlinkResourceTag(int position, int ordinal, LinkedHashMap<String, String> attributes, String inputString, int parsePosition) Creates a Resource hyperlink 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 of this tag.Class<?> Returns the reference class used by this tag, e.g.booleansetReference(String ref) Sets the "ref" Asset reference.voidSets the target reference, if supported.booleanChecks if this string will lose formatting when translated to PLAIN.Methods inherited from class com.iizix.text.KStringHTMLDynamicTag
getHTMLTagText, isReferenceTagMethods inherited from class com.iizix.text.KStringHTMLTag
create, disposeTagReference, equalsName, resolveMethods inherited from class com.iizix.text.KStringTag
appendHTMLAttributes, appendHTMLAttributes, appendHTMLAttributesSkip, appendPLAINAttributes, appendPLAINValue, clone, equals, getAttribute, getReferenceError, getReferenceType, getSourceEndPosition, getSourceLength, getSourcePosition, getType, isReferenceValid, isRefreshRequired, isRefreshRequired, setAttribute, setSourceLocation, verifyMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.iizix.text.IKStringHTMLHyperlink
getAttribute, getSourceEndPosition, getSourcePosition, getType, setAttribute
Constructor Details
KStringHTMLHyperlinkResourceTag
public KStringHTMLHyperlinkResourceTag(int position, int ordinal, LinkedHashMap<String, String> attributes, String inputString, int parsePosition) throws KStringParseExceptionCreates a Resource 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 Details
setTarget
Sets the target reference, if supported.- Specified by:
setTargetin interfaceIKStringHTMLHyperlink- Parameters:
target- The new target.
setReference
Sets the "ref" Asset reference.- Specified by:
setReferencein interfaceIKStringHTMLHyperlink- Overrides:
setReferencein classKStringHTMLTag<FileURIPropCnr>- Parameters:
ref- The Asset reference.- Returns:
- true if changed, false for no change.
getReference
Gets the reference of this tag.- Specified by:
getReferencein classKStringHTMLDynamicTag<FileURIPropCnr>- Returns:
- The reference, or null for none.
getReferenceClass
Returns the reference class used by this tag, e.g. KStringProp for text table, or the image class IImageTarget.class.- Overrides:
getReferenceClassin classKStringTag<FileURIPropCnr>- Returns:
- null for now!
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:
willLoseFormattingin classKStringHTMLDynamicTag<FileURIPropCnr>- Returns:
- Always true.
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:
getPLAINTagTextin classKStringHTMLDynamicTag<FileURIPropCnr>- Parameters:
useme- Temporary StringBuilder for any use.- Returns:
- Empty string always: there is no conversion possible.
getPLAINString
Gets the string representation of this tag in the PLAIN format, i.e. returns empty string.- Specified by:
getPLAINStringin classKStringHTMLDynamicTag<FileURIPropCnr>- 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
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:
getHTMLStringin interfaceIKStringHTMLHyperlink- Overrides:
getHTMLStringin classKStringHTMLDynamicTag<FileURIPropCnr>- Parameters:
useme- Temporary StringBuilder for any use.provider- The information provider or null for none.- Returns:
- The HTML string.