Class KStringHTMLHyperlinkVSTag

    • 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 interface IKStringHTMLHyperlink
        Parameters:
        target - The new target.
      • 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 class KStringTag<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 class KStringHTMLDynamicTag<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 class KStringHTMLDynamicTag<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 class KStringHTMLDynamicTag<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 interface IKStringHTMLHyperlink
        Overrides:
        getHTMLString in class KStringHTMLDynamicTag<IVSComponent>
        Parameters:
        useme - Temporary StringBuilder for any use.
        provider - The information provider or null for none.
        Returns:
        The HTML string.