Class KStringHTMLTextTableTag

    • Constructor Detail

      • KStringHTMLTextTableTag

        public KStringHTMLTextTableTag​(int position,
                                       int ordinal,
                                       java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes,
                                       java.lang.String inputString,
                                       int parsePosition)
                                throws KStringParseException
        Creates a text table 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

      • 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<KStringProp>
        Returns:
        KStringProp.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<KStringProp>
        Returns:
        Always false.
      • 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<KStringProp>
      • getPLAINString

        public java.lang.String getPLAINString​(java.lang.StringBuilder useme,
                                               IKStringInfoProvider provider)
        Gets the string representation of this tag in the PLAIN format.
        Specified by:
        getPLAINString in class KStringHTMLDynamicTag<KStringProp>
        Parameters:
        useme - Temporary StringBuilder for any use.
        provider - The information provider or null for none.
        Returns:
        The Plain string resolved, or with error.
      • getHTMLString

        public java.lang.String getHTMLString​(java.lang.StringBuilder useme,
                                              IKStringInfoProvider provider)
        Gets the string representation of this tag in the HTML format, i.e. return the text table item escaped for HTML.
        Overrides:
        getHTMLString in class KStringHTMLDynamicTag<KStringProp>
        Parameters:
        useme - Temporary StringBuilder for any use.
        provider - The information provider or null for none.
      • isRefreshRequired

        public boolean isRefreshRequired​(RefreshEvent event)
        Returns whether the tags needs a refresh for the specified refresh type.
        Overrides:
        isRefreshRequired in class KStringTag<KStringProp>
        Parameters:
        event - The refresh event.
        Returns:
        true for refresh needed, false otherwise.
      • isRefreshRequired

        public boolean isRefreshRequired​(GEvent event,
                                         KStringProp ksp)
        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 class KStringTag<KStringProp>
        Parameters:
        event - The event.
        ksp - The target property for the tag.
        Returns:
        true to refresh the KString, false not to.