Class Colorize


  • public class Colorize
    extends java.lang.Object
    Colorize - Documentation.

    The class Colorize, appends CSS class attributes to the many of the HTML Elements inside of a JavaDoc generated web-page - for instance, the web-page you are currently reading right now! Mostly, the HTML packages from this JAR Library are used to parse an HTML page, and then it is searched for all of the usual elements that JavaDoc places into an HTML Class Documentation Web-Page.

    Once CLASS and ID information has been added, it becomes a trivial task to improve the readability of many of the complicated descriptions that are in Documentation Pages. Such is performed using a simple CSS page.

    NOTE: There is a simple chart that explains each of the CSS class and ID attributes that are added (or in some cases, appended) to the HTML Elements of an Upgraded Java-Doc Documentation Web-page.

    The default CSS File used with this upgrader may be viewed here:

    Default CSS File



    • Field Detail

      • CSS_ID_FOR_TITLE

        public static final java.lang.String CSS_ID_FOR_TITLE
        This is the name of the CSS Class that is added to the Class, Interface or Enumerated-Type Title.
        Property Explanation & Value
        CSS ID C01
        Formatting Purpose Page Title
        javadoc HTML Use <h2 class="title" title="Class Colorize" id='C01'>Class Colorize</h2>
        Default JavaDoc.css #C01 { padding: 1.5em 1.2em 1.5em 1.2em; border-radius: 2em; box-shadow: inset 0 0 1em #4D7A97; font-size: 1.2em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_ID_FOR_TITLE = "C01";
        
      • CSS_ID_FOR_PACKAGE

        public static final java.lang.String CSS_ID_FOR_PACKAGE
        This is the name of the CSS Class that is added to the Package-Name for the Class, Interface, or Enumerated-Type.
        Property Explanation & Value
        CSS ID C02
        Formatting Purpose Full Package Specified Name
        javadoc HTML Use <div class="subTitle" id='C02'>Torello.HTML.Tools.JavaDoc</div>
        Default JavaDoc.css #C02 { padding: 1em 1em 1em 1em; font-weight: bold; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_ID_FOR_PACKAGE = "C02";
        
      • CSS_CLASS_FOR_INHERITANCE

        public static final java.lang.String CSS_CLASS_FOR_INHERITANCE
        This is the name of the CSS Class that is added to each of the HTML <UL> ... </UL> used to depict the "inheritance model" used for both classes and interfaces. There may be multiple Unordered Lists employed by the Java-Doc tool to show the inheritance.
        Property Explanation & Value
        CSS Class-Name C03
        Formatting Purpose Indented Inheritance List
        javadoc HTML Use <ul class='C03 inheritance'>
        Default JavaDoc.css UL.C03 LI { padding-left: 1em; line-height: 1.8; font-weight: bold; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_INHERITANCE = "C03";
        
      • CSS_ID_FOR_HEADERDL

        public static final java.lang.String CSS_ID_FOR_HEADERDL
        This is the name of the CSS Class that is added to the HTML '<DL> ... </DL>' header HTML Term-Definition list. There will only be one, outer, <DL> subsection; however, nestled between this list could be anywhere from 1 to 4 (or, possibly, even more) '<DD>...</DD>' and '<DT>...</DTL>' sublists that describe certain issues. Below is a brief list of some of the sublists that would be depicted at the top of a JavaDoc Generated Web-page using the HTML '<DL> ... </DL>' list:

        • Functional Interface Explanations
        • 'Implemented Interfaces' followed by a list
        • Direct Known Subclasses
        • SuperInterfaces
        • ... and more

        Property Explanation & Value
        CSS Class-Name C04
        Formatting Purpose Notes about the CIET - Classes, Interfaces & Enumerated-Types, etc...
        javadoc HTML Use <dl id='C04'>
        Default JavaDoc.css .C04 DT, .srcCodeLabel { background: lightgray; padding: 0.8em 1em 0.8em 1.5em; margin: 1.6em 1em 1.6em 0em; font-weight: bold; font-size: 1.1em; color: brown; display: block; width: 20vw; /* these are "wider" */ border-radius: 1.5em; box-shadow: 0.5em 0.6em 0.3em -0.3em #2c4557; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_ID_FOR_HEADERDL = "C04";
        
      • CSS_CLASS_FOR_PARAMETER_DEFINITIONS

        public static final java.lang.String CSS_CLASS_FOR_PARAMETER_DEFINITIONS
        This is the name of the CSS Class that is added to the HTML '<CODE>...</CODE>' element for each parameter whose definition is explained on a Java Documentation Web-Page. This allows a programmer to change how the "Parameter Declaration Part" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C05
        Formatting Purpose Parameter Names
        javadoc HTML Use <code class='C05'>javaDocHTMLCIETPage</code>
        Default JavaDoc.css .C05 { font-weight: bold; color: black; background: lightgreen; padding: 0.1em 4em 0.1em 2em; border-radius: 0.5em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_PARAMETER_DEFINITIONS = "C05";
        
      • CSS_CLASS_FOR_PARAMETER_DD_ELEMENT

        public static final java.lang.String CSS_CLASS_FOR_PARAMETER_DD_ELEMENT
        This is the name of the CSS Class that is added to the HTML '<DD>...</DD>' element for each parameter whose definition is explained on a Java Documentation Web-Page. This allows a programmer to change how the overall / complete "Parameter Definition" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C06
        Formatting Purpose Parameter Name & Definition
        javadoc HTML Use <dd class='C06'>
        Default JavaDoc.css .C06 { padding: 0.6em 1.5em 0.6em 3em; line-height: 1.8em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_PARAMETER_DD_ELEMENT = "C06";
        
      • CSS_CLASS_FOR_THROWS

        public static final java.lang.String CSS_CLASS_FOR_THROWS
        This is the name of the CSS Class that is added to the HTML '<CODE>...</CODE>' element for each 'throws' on a Java Documentation Web-Page. This allows a programmer to change how the overall / complete "Throws Explanation" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C07
        Formatting Purpose HTML Code Element for Exception & Throws Names
        javadoc HTML Use <code class='C07 '>java.util.ConcurrentModificationException</code>
        Default JavaDoc.css .C07 { background: black; color: lightgreen; font-weight: bold; padding: 0.2em 3em 0.2em 1em; border-radius: 0.5em; } .C07 a:link, .C07 a:visited { color: lightgreen; } .C07 a:hover { color: lightskyblue; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_THROWS = "C07";
        
      • CSS_CLASS_FOR_THROWS_DD_ELEMENT

        public static final java.lang.String CSS_CLASS_FOR_THROWS_DD_ELEMENT
        This is the name of the CSS Class that is added to the HTML '<DD>...</DD>' element for each 'throws' on a Java Documentation Web-Page. This allows a programmer to change how the overall / complete "Throws Explanation" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C08
        Formatting Purpose HTML DD For Exceptions & Throws
        javadoc HTML Use <dd class='C08'><code class='C07'> <a href="../../Torello/Java/DirExpectedException.html" title="class in Torello.Java"> ...
        Default JavaDoc.css .C06 { padding: 0.6em 1.5em 0.6em 3em; line-height: 1.8em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_THROWS_DD_ELEMENT = "C08";
        
      • CSS_CLASS_FOR_SIGNATURES

        public static final java.lang.String CSS_CLASS_FOR_SIGNATURES
        This is the name of the CSS Class that is added to the HTML '<PRE>...</PRE>' element for each field, constructor and method "signature" section that is at the top of each "Details Section" for Methods, Classes, and Fields in a Java Documentation Web-Page. This allows a programmer to change how the "Signature Part" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C09
        Formatting Purpose Method, Field & Constructor "Signature"
        javadoc HTML Use <pre class='C09'>protected&nbsp; <a href="../../src-html/Torello/Java/FileNode.html#line.176"> FileNode</a>(java.lang.String&nbsp;name)</pre>
        Default JavaDoc.css .C09 { border: 1px solid; padding: 1.2em 1em 1.2em 1em; box-shadow: 12px 12px 8px 0px rgba(0,0,0,0.65); margin: 1.5em 2em 2em 0em; overflow: auto; font-size: 1.1em; font-weight: bold; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_SIGNATURES = "C09";
        
      • CSS_ID_FOR_SIGNATURES_HEADER

        public static final java.lang.String CSS_ID_FOR_SIGNATURES_HEADER
        This is the name of the CSS ID that is added to the HTML '<PRE>...</PRE>' element for each class, interface or enumerated type "signature" at the top of the page. This allows a programmer to change how the "Top Class Signature Part" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C10
        Formatting Purpose Primary (at top of page) Class, Interface "Signature"
        javadoc HTML Use <pre id='C10'>public class <a href="../../../../src-html/Torello/HTML/Tools/JavaDoc/Upgrade.html#line.20"> Upgrade</a> extends java.lang.Object</pre>
        Default JavaDoc.css #C10 { border: 1px solid; padding: 1.2em 1em 1.2em 1em; box-shadow: 12px 12px 8px 0px rgba(0,0,0,0.65); margin: 1em 2em 2em 0em; overflow: auto; font-size: 1.1em; font-weight: bold; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_ID_FOR_SIGNATURES_HEADER = "C10";
        
      • CSS_ID_FOR_DESCRIPTION_HEADER

        public static final java.lang.String CSS_ID_FOR_DESCRIPTION_HEADER
        This is the name of the CSS ID that is added to the HTML '<PRE>...</PRE>' element for each class, interface or enumerated type "description divider (<DIV>...</DIV>)" element at the top of the class page. This allows a programmer to change how the "Top Class Description" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C11
        Formatting Purpose Primary Class, Interface or Enumerated Type (Yellow) "Description" (at the top of the page).
        javadoc HTML Use <div class="block" id='C11'> <CODE>JavaDoc Upgrade (Builder) - Documentation.</CODE><BR /><BR /> This class is designed as a Class Builder. It will load the pertinent list files that
        Default JavaDoc.css #C11 { background: lightyellow; padding: 1.5em 2em 1.5em 1.7em; border: 1px solid #F8981D; border-radius: 2em; margin: 0em 2em 0em 0em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_ID_FOR_DESCRIPTION_HEADER = "C11";
        
      • CSS_CLASS_FOR_DESCRIPTIONS

        public static final java.lang.String CSS_CLASS_FOR_DESCRIPTIONS
        This is the name of the CSS Class that is added to the first HTML '<DIV CLASS='block'>...</DIV>' element for each field, constructor and method "description" section that is at the top of each "Details Section" for Methods, Classes, and Fields in a Java Documentation Web-Page. This allows a programmer to change how the "Description Part" looks in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C12
        Formatting Purpose Light-Yellow "Primary-Description" for Methods, Fields, Constructors...
        javadoc HTML Use <div class='C12 block'>As noted in another comment, the Java-Parser library, which builds "Parse Trees" consumes ...
        Default JavaDoc.css .C12 { background: lightyellow; padding: 1.5em 2em 1.5em 1.7em;; border: 0.1em solid #F8981D; border-radius: 2em; margin: 0em 2em 0em 0em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_DESCRIPTIONS = "C12";
        
      • CSS_CLASS_FOR_SEE_ALSO

        public static final java.lang.String CSS_CLASS_FOR_SEE_ALSO
        This is the name of the CSS Class that is added to each and every <CODE> and <A HREF=...> HTML Element found inside of a Java-Doc Web-Page's "See Also" Section. These CSS Class Tags are added to any and all "See Also" sections for each and every method, constructor or field inside of a Java-Doc HTML Page. This allows a programmer to change how the "See Also Links" look in a Java Doc Page - using an external CSS Page.
        Property Explanation & Value
        CSS Class-Name C13
        Formatting Purpose Convert all "See Also" labels from Inline to Block, for better spacing.
        javadoc HTML Use <dd><a href="../../Torello/Java/FileNode.html#name" class='C13'> <code class='C13 '>name</code></a> ...
        Default JavaDoc.css CODE.C13, A.C13 { font-weight: bold; display: block; padding: 0em 0em 0em 1.5em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_SEE_ALSO = "C13";
        
      • CSS_CLASS_COMMA_SEE_ALSO

        public static final java.lang.String CSS_CLASS_COMMA_SEE_ALSO
        This helps 'erase' the comma after each element of a "See Also" list. The best way to deal with the "See Also" links is to add the CSS Style Directive "display: block;". This allows each of the "See Also" links to be viewed on separate lines. If the links are, they look much better on separate lines. Unfortunately there ends up being a problem with a "Comma" in between each line. By adding an HTML <SPAN CLASS='COMMA_SEE_ALSO'>,</SPAN> three-element list after each of the SEE ALSO links, one may hide or show the comma at the programmers discretion.

        AGAIN: The best way to put each of the links on a separate is to just add the "display: block" directive to elements with class 'COLORIZEDSEEALSO'.
        Property Explanation & Value
        CSS Class-Name C14
        Formatting Purpose HACK: Get's rid of a ',' ('Comma-Character') inserted by JavaDoc.
        javadoc HTML Use <SPAN CLASS='C14'>,</SPAN>
        Default JavaDoc.css .C14 { display: none; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_COMMA_SEE_ALSO = "C14";
        
      • CSS_CLASS_FOR_CODE_METHOD_LABEL

        public static final java.lang.String CSS_CLASS_FOR_CODE_METHOD_LABEL
        This CSS class if for the HTML <DD>, <DT> Elements that incorporate Code-HiLited Method Bodies. This CSS class, specifically, is placed in an HTML <SPAN>...</SPAN> element, and is for the method-body label. If this had had an original CSS Class, before renaming, it would have been something to the effect "Colorize Code Method Body Label" (all one word). The HTML Element itself is similar to the elements automatically created by the original java-doc tool. On the actual documentation page, it will look like:

        HTML Elements:
        1
        2
        3
        4
        5
        6
        7
         <span class="paramLabel">Parameters:</span>
         <span class="seeLabel">See Also:</span>
         <span class="returnLabel">Returns:</span>
        
         <!-- And this CSS Class facilitates the addition of ... ->
         <SPAN CLASS="C15">Code:</SPAN>  ... Code Hi-Lited Method Body
         
        

        Property Explanation & Value
        CSS Class-Name C15
        Formatting Purpose Generates / Creates a new "Label" for (Methods) Code-Hiliting - a label similar to the "See Also", "Throws", etc...
        javadoc HTML Use <DT><span class='C15'>Code:</span></dt>
        Default JavaDoc.css .paramLabel, .returnLabel, .seeLabel, .throwsLabel, .overrideSpecifyLabel, .C15, .C17 { background: lightgray; padding: 0.8em 1em 0.8em 1.5em; margin: 1.6em 1em 1.6em 0em; font-weight: bold; font-size: 1.1em; color: brown; display: block; width: 10vw; /* These are shorter that the ones at the top with the identical CSS */ border-radius: 1.5em; box-shadow: 0.5em 0.6em 0.3em -0.3em #2c4557; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_CODE_METHOD_LABEL = "C15";
        
      • CSS_CLASS_FOR_CODE_METHOD_DEFINITION

        public static final java.lang.String CSS_CLASS_FOR_CODE_METHOD_DEFINITION
        This CSS class if for the HTML <DD>, <DT> Elements that incorporate Code-HiLited Method Bodies. This CSS class, is for the method-body itself. It is placed in the HTML <DD> element that contains the actual Hi-Lited Source Code. If this had had an original CSS Class, before renaming, it would have been something to the effect "Colorize Code Method Body" (all one word).
        Property Explanation & Value
        CSS Class-Name C16
        Formatting Purpose Currently has no CSS Definition (unused). Inserted into an HTML 'DD' Element for Hilited Method Code.
        javadoc HTML Use <DD CLASS='C16'><B>Exact Method Body:</B><BR />
        Default JavaDoc.css .C16, .C18 { padding: 0.5em 1em 0em 1em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_CODE_METHOD_DEFINITION = "C16";
        
      • CSS_CLASS_FOR_CODE_FIELD_LABEL

        public static final java.lang.String CSS_CLASS_FOR_CODE_FIELD_LABEL
        This CSS class if for the HTML <DD>, <DT> Elements that incorporate Code-HiLited Field Definitions. This CSS class, specifically, is placed in an HTML <SPAN>...</SPAN> element, and is for the field-body label. If this had had an original CSS Class, before renaming, it would have been something to the effect "Colorize Code Field Label" (all one word). The HTML Element itself is similar to the elements automatically created by the original java-doc tool. On the actual documentation page, it will look like:

        HTML Elements:
        1
        2
        3
        4
        5
        6
        7
         <span class="paramLabel">Parameters:</span>
         <span class="seeLabel">See Also:</span>
         <span class="returnLabel">Returns:</span>
        
         <!-- And this CSS Class facilitates the addition of ... ->
         <SPAN CLASS="C17">Code:</SPAN>  ... Code Hi-Lited Method Body
         
        

        Property Explanation & Value
        CSS Class-Name C17
        Formatting Purpose Generates / Creates a new "Label" for (Fields) Code-Hiliting - a label similar to the "See Also", "Throws", etc...
        javadoc HTML Use <DT><span class='C17'>Code:</span></dt>
        Default JavaDoc.css .paramLabel, .returnLabel, .seeLabel, .throwsLabel, .overrideSpecifyLabel, .C15, .C17 { background: lightgray; padding: 0.8em 1em 0.8em 1.5em; margin: 1.6em 1em 1.6em 0em; font-weight: bold; font-size: 1.1em; color: brown; display: block; width: 10vw; /* These are shorter that the ones at the top with the identical CSS */ border-radius: 1.5em; box-shadow: 0.5em 0.6em 0.3em -0.3em #2c4557; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_CODE_FIELD_LABEL = "C17";
        
      • CSS_CLASS_FOR_CODE_FIELD_DEFINITION

        public static final java.lang.String CSS_CLASS_FOR_CODE_FIELD_DEFINITION
        This CSS class if for the HTML <DD>, <DT> Elements that incorporate Code-HiLited Field Definitions. This CSS class, is for the field-definition itself. It is placed in the HTML <DD> element that contains the actual Hi-Lited Source Code Definition. If this had had an original CSS Class, before renaming, it would have been something to the effect "Colorize Code Field Definitions" (all one word).
        Property Explanation & Value
        CSS Class-Name C18
        Formatting Purpose Currently has no CSS Definition (unused). Inserted into an HTML 'DD' Element for Hilited Field Definitions.
        javadoc HTML Use <DD CLASS='C18'><B>Exact Field Declaration Expression:</B><BR />
        Default JavaDoc.css .C16, .C18 { padding: 0.5em 1em 0em 1em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_CODE_FIELD_DEFINITION = "C18";
        
      • CSS_CLASS_FOR_RETURN_DD

        public static final java.lang.String CSS_CLASS_FOR_RETURN_DD
        This CSS class if for the HTML <DD> Elements that hold a "Return Value Description" for methods in which the programmer has provided some kind of description.
        Property Explanation & Value
        CSS Class-Name C19
        Formatting Purpose HTML <DD> Element. Holds the return-value explanation for methods
        javadoc HTML Use <DD CLASS='C19'>This method returns an HTML Element, as a String.</dd>
        Default JavaDoc.css .C19 { padding: 0.3em 3.5em 0.3em 2em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_RETURN_DD = "C19";
        
      • CSS_CLASS_FOR_NAME_H4

        public static final java.lang.String CSS_CLASS_FOR_NAME_H4
        This CSS Class is used for the "Name" (an HTML <H4>...</H4> element. Every Method, Constructor, Field, and Enumerated-Constant (of an Enumerated-Type) has a name-portion at the top of the Details section the begins the description/definition of the "Details Section".
        Property Explanation & Value
        CSS Class-Name C20
        Formatting Purpose HTML <H4> Element. Holds the naem of the item being described.
        javadoc HTML Use <h4>TagNode</h4>
        Default JavaDoc.css .C20 { color: #4A6782; font-family: Arial, Helvetica, sans-serif; font-size: 140%; letter-spacing: 0.05em; }
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final String CSS_CLASS_FOR_NAME_H4 = "C20";
        
    • Method Detail

      • run

        public static int run​(java.util.Vector<HTMLNode> javaDocHTMLCIETPage,
                              StorageWriter sw)
        This method executes all of the 'protected' methods available in this class.
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        sw - This will print some text-status output. If parameter 'sw' is null, it will be ignored.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        addCSSClassToParameters(Vector), addCSSClassToSignatures(Vector), addCSSClassToDescriptions(Vector), addCSSClassToSeeAlsoSections(Vector), addCSSClassToThrows(Vector), addCSSIDsToTop(Vector)
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
         if (sw != null) sw.println("Colorize.run(...)");
        
         int numCSSAttributesAdded = 0;
        
         // Add all of the appropriate CSS Class Names to the correct places 
         numCSSAttributesAdded += Colorize.addCSSClassToParameters(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToSignatures(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToDescriptions(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToSeeAlsoSections(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToThrows(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSIDsToTop(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToReturnsDDs(javaDocHTMLCIETPage);
         numCSSAttributesAdded += Colorize.addCSSClassToNames(javaDocHTMLCIETPage);
        
         if (sw != null) sw.println(
             "\tAdded    " + C.BBLUE + StringParse.zeroPad(numCSSAttributesAdded, 5) + C.RESET +
             " CSS ID, CLASS Attributes"
         );
        
         return numCSSAttributesAdded;
        
      • addCSSClassToNames

        public static int addCSSClassToNames​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This will CSS Class Information to the HTML '<H4>' Element that holds the name of each of the methods, fields, etc... defined in the "Method Details," "Field Details," sections (respectively). The CSS Class inserted is simply name 'C20'
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        Details.hasConstructorDetails(Vector), Details.hasMethodDetails(Vector), Details.hasFieldDetails(Vector), Details.hasEnumConstDetails(Vector), Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), Details.fieldDetailsIterator(Vector), Details.enumConstDetailsIterator(Vector), DetailsPartConstructor.name(Vector), DetailsPartMethod.name(Vector), DetailsPartField.name(Vector), DetailsPartEnumConst.name(Vector), CSS_CLASS_FOR_NAME_H4
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the <H4>NAME</H4> in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_H4_NAME_CLASS_TAG
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::name);
        
         // Add CSS Class-Names for the <H4>NAME</H4> in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_H4_NAME_CLASS_TAG
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::name);
        
         // Add CSS Class-Names for the <H4>NAME</H4> in each method of the JavaDoc "Field Details" Section.
         if (Details.hasFieldDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_H4_NAME_CLASS_TAG
                 (Details.fieldDetailsIterator(javaDocHTMLCIETPage), DetailsPartField::name);
        
         // Add CSS Class-Names for the <H4>NAME</H4> in each method of the JavaDoc "Enumerated-Constant Details" Section.
         if (Details.hasEnumConstDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_H4_NAME_CLASS_TAG
                 (Details.enumConstDetailsIterator(javaDocHTMLCIETPage), DetailsPartEnumConst::name);
        
         return numCSSAttributesAdded;
        
      • ADD_H4_NAME_CLASS_TAG

        protected static int ADD_H4_NAME_CLASS_TAG​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getName)
        
        Inserts a CSS Class Tag into each name definition in each details section returned by the HNLIIterator. Internally used method.
        Parameters:
        iter - This iterates over the particular method, constructor, field, etc... details sections on the page
        getName - This is a Java lambda function-pointer for retrieving the "Name" section.
        See Also:
        DotPair, HNLIInclusive, AbstractHNLI.set(Vector), CSS_CLASS_FOR_NAME_H4
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
         int numCSSAttributesAdded = 0;
         Vector<HTMLNode> v;
        
         while (iter.hasNext())
         {
             DotPair name = getName.apply(v = iter.next());
             v.setElementAt(H4_FOR_NAMES, name.start);
             iter.set(v);
             numCSSAttributesAdded++;
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToReturnsDDs

        public static int addCSSClassToReturnsDDs​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This will add the appropriate CSS Class Names to all Method Details sections.
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        See Also:
        Details.hasMethodDetails(Vector), TagNodeFind, AbstractHNLI.set(Vector)
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) == null) return 0;
        
         HNLIInclusive       iter                    = Details.methodDetailsIterator(javaDocHTMLCIETPage);
         int                 numCSSAttributesAdded   = 0;
         int                 pos;
         Vector<HTMLNode>    v;
         DotPair             r;
        
         while (iter.hasNext())
             if ((r = DetailsPartMethod.returns(v = iter.next())) != null)
                 if ((pos = TagNodeFind.first(v, r.start, r.end, TC.OpeningTags, "dd")) != -1)
                 { 
                     v.setElementAt(DD_FOR_RETURNS, pos); 
                     iter.set(v);
                     numCSSAttributesAdded++;
                 }
         return numCSSAttributesAdded;
        
      • addCSSIDsToTop

        public static int addCSSIDsToTop​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS ID information to the first HTML '<PRE>' element in the top-header part of a JavaDoc Page. The CSS ID was formerly named: "COLORIZEDSIGNATURE_HEADER"

        It will also add a CSS ID to the HTML divider (<DIV> ... </DIV>) element at the top of the page. This divider holds a "main description" for the class, interface or enumerated-type'. This CSS ID was formerly named: "COLORIZED_DESCRIPTION_HEADER_DIV".
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TopDescription.descriptionAtTop(Vector), TagNodeFind, TagNode, TC.OpeningTags, SD.SingleQuotes, CSS_ID_FOR_SIGNATURES_HEADER, CSS_ID_FOR_DESCRIPTION_HEADER, CSS_ID_FOR_HEADERDL, CSS_ID_FOR_DESCRIPTION_HEADER, CSS_ID_FOR_PACKAGE, CSS_CLASS_FOR_INHERITANCE, CSS_ID_FOR_TITLE
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54
        55
        56
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
         int numCSSAttributesAdded = 0;
        
         DotPair dp;   int pos;   TagNode tn;
        
         // Add an "ID" to the first HTML <PRE> Element - this is where the class "signature" is
         if ((dp = TopDescription.descriptionAtTop(javaDocHTMLCIETPage)) != null)
             if ((pos = TagNodeFind.first(javaDocHTMLCIETPage, dp.start, dp.end + 1, TC.OpeningTags, "pre")) != -1)
             {
                 tn = (TagNode) javaDocHTMLCIETPage.elementAt(pos);
                 tn = tn.setID(CSS_ID_FOR_SIGNATURES_HEADER, SD.SingleQuotes);
                 javaDocHTMLCIETPage.setElementAt(tn, pos);
                 numCSSAttributesAdded++;
             }
        
         // Add an "ID" to the first HTML <DIV> Element - this is where the "description" is
         /*
             pos = TagNodeFind.first(javaDocHTMLCIETPage, pos, dp.end + 1, TC.OpeningTags, "div");
             if (pos == -1) return numCSSAttributesAdded;
             n = javaDocHTMLCIETPage.elementAt(pos);
             if ((n == null) || (! (n instanceof TagNode))) return numCSSAttributesAdded;
             tn = (TagNode) n;
             if ((! tn.tok.equals("div")) || tn.isClosing) return numCSSAttributesAdded;
         */
         dp = TopDescription.dividerInsideDescriptionAtTop(javaDocHTMLCIETPage);
         if (dp != null)
         {
             tn = ((TagNode) javaDocHTMLCIETPage.elementAt(dp.start));
             tn = tn.setID(CSS_ID_FOR_DESCRIPTION_HEADER, SD.SingleQuotes);
             javaDocHTMLCIETPage.setElementAt(tn, dp.start);
             numCSSAttributesAdded++;
         }
        
         // Add the CSS ID's to the HEADER <DL> elements of a java-doc generated CIET web-page.
         Vector<DotPair> allDLs = TopDescription.allTopDLs(javaDocHTMLCIETPage);
         if (allDLs.size() > 0)
             for (DotPair DL_DP : allDLs)
             {
                 tn = (TagNode) javaDocHTMLCIETPage.elementAt(DL_DP.start);
                 tn = tn.appendCSSClass(CSS_ID_FOR_HEADERDL, SD.SingleQuotes);
                 javaDocHTMLCIETPage.setElementAt(tn, DL_DP.start);
                 numCSSAttributesAdded++;
             }
        
         // Add a CSS 'id' to the package-identifier at the top of a java-doc generated CIET page
         dp = TopDescription.packageInfo(javaDocHTMLCIETPage);
         if (dp != null)
         {
             tn = (TagNode) javaDocHTMLCIETPage.elementAt(dp.start);
             tn = tn.setID(CSS_ID_FOR_PACKAGE, SD.SingleQuotes);
             javaDocHTMLCIETPage.setElementAt(tn, dp.start);
             numCSSAttributesAdded++;
         }
        
         // Add CSS Classes to the inheritance-tree HTML Elements
         Vector<SubSection> vss = TopDescription.inheritance(javaDocHTMLCIETPage);
         for (SubSection ss : vss)
         {
             tn = (TagNode) javaDocHTMLCIETPage.elementAt(ss.location.start);
             tn = tn.appendCSSClass(CSS_CLASS_FOR_INHERITANCE, SD.SingleQuotes);
             javaDocHTMLCIETPage.setElementAt(tn, ss.location.start);
             numCSSAttributesAdded++;
         }
        
         // Add a CSS 'id' to the main "Title" of a java-doc generated CIET page.
         dp = TopDescription.title(javaDocHTMLCIETPage);
         if (dp != null)
         {
             tn = (TagNode) javaDocHTMLCIETPage.elementAt(dp.start);
             tn = tn.setID(CSS_ID_FOR_TITLE, SD.SingleQuotes);
             javaDocHTMLCIETPage.setElementAt(tn, dp.start);
             numCSSAttributesAdded++;
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToThrows

        public static int addCSSClassToThrows​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS class information to all HTML '<DD>...</DD>' elements in the 'throws section of both constructor details and method details. The CSS Class was formerly named:"COLORIZEDTHROWS"
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), DetailsPartConstructor.throwing(Vector), DetailsPartMethod.throwing(Vector), CSS_CLASS_FOR_THROWS_DD_ELEMENT, CSS_CLASS_FOR_THROWS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the THROWS-EXCEPTIONS in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_THROWS_CLASS_TAGS
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::throwing);
        
         // Add CSS Class-Names for the THROWS-EXCEPTIONS in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_THROWS_CLASS_TAGS
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::throwing);
        
         return numCSSAttributesAdded;
        
      • ADD_THROWS_CLASS_TAGS

        protected static int ADD_THROWS_CLASS_TAGS​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getThrows)
        
        Inserts a CSS Class Tag into each parameter definition in each class or method details section returned by the HNLIIterator. Internally used method.
        Parameters:
        iter - This iterates over the particular method or constructor details sections on the page
        getThrows - This is a java lambda function-pointer for retrieving the section.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TagNodeFind, TagNode.appendCSSClass(String, SD), TC.OpeningTags, SD.SingleQuotes, AbstractHNLI.set(Vector), CSS_CLASS_FOR_THROWS_DD_ELEMENT, CSS_CLASS_FOR_THROWS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
         int numCSSAttributesAdded = 0;
        
         while (iter.hasNext())
         {
             Vector<HTMLNode>    v           = iter.next();
             DotPair             throwing    = getThrows.apply(v);
        
             // Some method's and some constructor do not have parameters.
             if (throwing == null) continue;
        
             // Retrieve each of the <DD>...</DD> innerHTML sections.  These are the 'throws' definitions
             // and explanations.  The first HTML Element found in this section should be a "<CODE>...</CODE>"
             // section.  This contains the "Throws Name."  This is the element that needs a CSS Class so that
             // it may be colorized, hilited, made 'bold', etc...
             int[] ddPosArr = TagNodeFind.all(v, throwing.start, throwing.end, TC.OpeningTags, "dd");
        
             // Iterate over each Parameter definition / explanation
             for (int ddPos : ddPosArr)
             {
                 TagNode tn = (TagNode) v.elementAt(ddPos);
        
                 // Replace the Opening HTML '<DD>' tag with a '<DD CLASS="COLORIZEDTHROWS">' tag.
                 tn = tn.appendCSSClass(CSS_CLASS_FOR_THROWS_DD_ELEMENT, SD.SingleQuotes);
                 v.setElementAt(tn, ddPos);
                 numCSSAttributesAdded++;
        
                 HTMLNode n = v.elementAt(ddPos + 1);
                 if ((n instanceof TagNode) && ((tn = (TagNode) n).tok.equals("code")))
                 {
                     // Replace the Opening HTML '<CODE>' tag with a '<CODE CLASS="COLORIZEDTHROWS">' tag.
                     tn = tn.appendCSSClass(CSS_CLASS_FOR_THROWS, SD.SingleQuotes);
                     v.setElementAt(tn, ddPos + 1);
                     numCSSAttributesAdded++;
                 }
             }
        
             // Replace the old "Throws Definition" section with the new, updated section.
             // The Iterator does an excellent job of replacing HTML sections with new, updated ones.
             iter.set(v);
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToParameters

        public static int addCSSClassToParameters​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS class information to all HTML '<DD>...</DD>' elements in the parameters section of both constructor details and method details. The CSS Class was formerly named: "COLORIZEDPARAMS"
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), DetailsPartConstructor.parameters(Vector), DetailsPartMethod.parameters(Vector), CSS_CLASS_FOR_PARAMETER_DD_ELEMENT, CSS_CLASS_FOR_PARAMETER_DEFINITIONS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the PARAMETERS in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_PARAMETERS_CLASS_TAGS
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::parameters);
        
         // Add CSS Class-Names for the PARAMETERS in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_PARAMETERS_CLASS_TAGS
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::parameters);
        
         return numCSSAttributesAdded;
        
      • ADD_PARAMETERS_CLASS_TAGS

        protected static int ADD_PARAMETERS_CLASS_TAGS​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getParameters)
        
        Inserts a CSS Class Tag into each parameter definition in each class or method details section returned by the HNLIIterator. Internally used method.
        Parameters:
        iter - This iterates over the particular method or constructor details sections on the page
        getParameters - This is a java lambda function-pointer for retrieving the section.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TagNodeFind, TagNode.appendCSSClass(String, SD), TC.OpeningTags, SD.SingleQuotes, AbstractHNLI.set(Vector), CSS_CLASS_FOR_PARAMETER_DD_ELEMENT, CSS_CLASS_FOR_PARAMETER_DEFINITIONS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
         int numCSSAttributesAdded = 0;
        
         while (iter.hasNext())
         {
             Vector<HTMLNode>    v           = iter.next();
             DotPair             parameters  = getParameters.apply(v);
        
             // Some method's and some constructor do not have parameters.
             if (parameters == null) continue;
        
             // Retrieve each of the <DD>...</DD> innerHTML sections.  These are the parameter definitions
             // and explanations.  The first HTML Element found in this section should be a "<CODE>...</CODE>"
             // section.  This contains the "Parameter Name."  This is the element that needs a CSS Class so that
             // it may be colorized, hilited, made 'bold', etc...
             int[] ddPosArr = TagNodeFind.all(v, parameters.start, parameters.end, TC.OpeningTags, "dd");
        
             // Iterate over each Parameter definition / explanation
             for (int ddPos : ddPosArr)
             {
                 TagNode tn = (TagNode) v.elementAt(ddPos);
        
                 // Replace the Opening HTML '<DD>' tag with a '<DD CLASS="COLORIZEDPARAMS">' tag.
                 tn = tn.appendCSSClass(CSS_CLASS_FOR_PARAMETER_DD_ELEMENT, SD.SingleQuotes);
                 v.setElementAt(tn, ddPos);
                 numCSSAttributesAdded++;
        
                 HTMLNode n = v.elementAt(ddPos + 1);
                 if ((n instanceof TagNode) && ((tn = (TagNode) n).tok.equals("code")))
                 {
                     // Replace the Opening HTML '<CODE>' tag with a '<CODE CLASS="COLORIZEDPARAMS">' tag.
                     tn = tn.appendCSSClass(CSS_CLASS_FOR_PARAMETER_DEFINITIONS, SD.SingleQuotes);
                     v.setElementAt(tn, ddPos + 1);
                     numCSSAttributesAdded++;
                 }
             }
        
             // Replace the old "Parameters Definition" section with the new, updated section.
             // The Iterator does an excellent job of replacing HTML sections with new, updated ones.
             iter.set(v);
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToSignatures

        public static int addCSSClassToSignatures​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS class information to all HTML '<PRE>...</PRE>' elements in all method, field and constructor details section. This constitutes adding a CSS Class to each "Signature" on the page. The CSS Class was formerly named: "COLORIZEDSIGNATURES"
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), Details.fieldDetailsIterator(Vector), DetailsPartConstructor.signature(Vector), DetailsPartMethod.signature(Vector), DetailsPartField.signature(Vector), DetailsPartEnumConst.signature(Vector), CSS_CLASS_FOR_SIGNATURES
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the TOP-SIGNATURE in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SIGNATURE_CLASS_TAGS
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::signature);
        
         // Add CSS Class-Names for the TOP-SIGNATURE in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SIGNATURE_CLASS_TAGS
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::signature);
        
         // Add CSS Class-Names for the TOP-SIGNATURE in each field of the JavaDoc "Field Details" Section.
         if (Details.hasFieldDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SIGNATURE_CLASS_TAGS
                 (Details.fieldDetailsIterator(javaDocHTMLCIETPage), DetailsPartField::signature);
        
         // Add CSS Class-Names for the TOP-SIGNATURE in each enumerated-constant-definition of the JavaDoc "Enumerated-Type Details" Section.
         if (Details.hasEnumConstDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SIGNATURE_CLASS_TAGS
                 (Details.enumConstDetailsIterator(javaDocHTMLCIETPage), DetailsPartEnumConst::signature);
        
         return numCSSAttributesAdded;
        
      • ADD_SIGNATURE_CLASS_TAGS

        protected static int ADD_SIGNATURE_CLASS_TAGS​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getSignature)
        
        Inserts a CSS Class Tag into each parameter definition in each class, method or field details section returned by the HNLIIterator. Internally used method.
        Parameters:
        iter - This iterates over the particular method, field or constructor details sections on the page
        getSignature - This is a java lambda function-pointer for retrieving the section.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TagNode.appendCSSClass(String, SD), SD.SingleQuotes, AbstractHNLI.set(Vector), CSS_CLASS_FOR_SIGNATURES
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
         int numCSSAttributesAdded = 0;
        
         while (iter.hasNext())
         {
             Vector<HTMLNode>    v           = iter.next();
             DotPair             signature   = getSignature.apply(v);
        
             // Some of these might not have a 'signature' part.  (Highly unlikely, but just in case)
             if (signature == null) continue;
        
             // The <PRE> Element that needs to have a CSS Class added.
             // It should be the first element in the 'Signature DotPair' that was returned by the
             // "getSignature" method
        
             TagNode tn = (TagNode) v.elementAt(signature.start);
             tn = tn.appendCSSClass(CSS_CLASS_FOR_SIGNATURES, SD.SingleQuotes);
             v.setElementAt(tn, signature.start);
             numCSSAttributesAdded++;
        
             // Use the iterator to replace the old signature with the new, updated one.
             iter.set(v);
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToDescriptions

        public static int addCSSClassToDescriptions​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS class information to the first identified HTML '<DIV CLASS='block'>...</DIV>' elements in all method, field and constructor details section. This constitutes adding a CSS Class to each "Description" on the page. The CSS Class was formerly named: "COLORIZEDDESCRIPTIONS"
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.\*
        See Also:
        Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), Details.fieldDetailsIterator(Vector), DetailsPartConstructor.description(Vector), DetailsPartMethod.description(Vector), DetailsPartField.description(Vector), DetailsPartEnumConst.description(Vector), CSS_CLASS_FOR_DESCRIPTIONS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the MAIN-DESCRIPTION in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_DESCRIPTION_CLASS_TAGS
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::description);
        
         // Add CSS Class-Names for the MAIN-DESCRIPTION in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_DESCRIPTION_CLASS_TAGS
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::description);
        
         // Add CSS Class-Names for the MAIN-DESCRIPTION in each field of the JavaDoc "Field Details" Section.
         if (Details.hasFieldDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_DESCRIPTION_CLASS_TAGS
                 (Details.fieldDetailsIterator(javaDocHTMLCIETPage), DetailsPartField::description);
        
         // Add CSS Class-Names for the MAIN-DESCRIPTION in each enumerated-constant-definition of the JavaDoc "Enumerated-Type Details" Section.
         if (Details.hasEnumConstDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_DESCRIPTION_CLASS_TAGS
                 (Details.enumConstDetailsIterator(javaDocHTMLCIETPage), DetailsPartEnumConst::description);
        
         return numCSSAttributesAdded;
        
      • ADD_DESCRIPTION_CLASS_TAGS

        protected static int ADD_DESCRIPTION_CLASS_TAGS​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getDescription)
        
        Inserts a CSS Class Tag into each description of each class, method or field details section returned by the HNLIIterator. Internally used method.
        Parameters:
        iter - This iterates over the particular method, constructor or field details sections on the page
        getDescription - This is a java lambda function-pointer for retrieving the section.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TagNode.appendCSSClass(String, SD), SD.SingleQuotes, AbstractHNLI.set(Vector), CSS_CLASS_FOR_DESCRIPTIONS
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
         int numCSSAttributesAdded = 0;
        
         while (iter.hasNext())
         {
             Vector<HTMLNode>    v           = iter.next();
             DotPair             description = getDescription.apply(v);
        
             // Some of these might not have a 'description' part.  This would be common for fields,
             // methods, etc... where the programmer has not written a "Description" portion in his
             // code-documentation.
             if (description == null) continue;
        
             // The <DIV CLASS='block'> Element that needs to have a CSS Class added.
             // It should be the first element in the 'Description DotPair' that was
             // returned by the "getDescription" method
        
             TagNode tn = (TagNode) v.elementAt(description.start);
             tn = tn.appendCSSClass(CSS_CLASS_FOR_DESCRIPTIONS, SD.SingleQuotes);
             v.setElementAt(tn, description.start);
             numCSSAttributesAdded++;
        
             // Use the iterator to replace the old description with the new, updated one.
             iter.set(v);
         }
        
         return numCSSAttributesAdded;
        
      • addCSSClassToSeeAlsoSections

        public static int addCSSClassToSeeAlsoSections​
                    (java.util.Vector<HTMLNode> javaDocHTMLCIETPage)
        
        This method will add CSS class information to each and every <CODE> and <A HREF=...> found within a JavaDoc HTML Page "See Also" Section. The HTML <CODE> ... </CODE> is used to wrap the "See also" link-text. The anchor-link itself is used to connect the user to another page of the Java Documentation. The CSS Class that is added to both the Anchor and Code Elements was formerly named: "COLORIZEDSEEALSO";
        Parameters:
        javaDocHTMLCIETPage - This should be a vectorized-HTML Java-Doc Generated Documentation Page for a CIET (Class, Interface, or Enumerated-Type). Load a Vector of HTMLNode for JavaDoc generated page the exact same way that any other HTML Page is vectorized into TagNode, TextNode, and CommentNode.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        Details.constructorDetailsIterator(Vector), Details.methodDetailsIterator(Vector), Details.fieldDetailsIterator(Vector), DetailsPartConstructor.see(Vector), DetailsPartMethod.see(Vector), DetailsPartField.see(Vector), CSS_CLASS_FOR_SEE_ALSO, COMMA_SPAN
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
         int numCSSAttributesAdded = 0;
        
         // Add CSS Class-Names for the SEE-ALSO in each constructor of the JavaDoc "Constructor Details" Section.
         if (Details.hasConstructorDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SEE_ALSO_CLASS_TAGS
                 (Details.constructorDetailsIterator(javaDocHTMLCIETPage), DetailsPartConstructor::see);
        
         // Add CSS Class-Names for the SEE-ALSO in each method of the JavaDoc "Method Details" Section.
         if (Details.hasMethodDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SEE_ALSO_CLASS_TAGS
                 (Details.methodDetailsIterator(javaDocHTMLCIETPage), DetailsPartMethod::see);
        
         // Add CSS Class-Names for the SEE-ALSO in each field of the JavaDoc "Field Details" Section.
         if (Details.hasFieldDetails(javaDocHTMLCIETPage) != null)
             numCSSAttributesAdded += ADD_SEE_ALSO_CLASS_TAGS
                 (Details.fieldDetailsIterator(javaDocHTMLCIETPage), DetailsPartField::see);
        
         return numCSSAttributesAdded;
        
      • ADD_SEE_ALSO_CLASS_TAGS

        protected static int ADD_SEE_ALSO_CLASS_TAGS​
                    (HNLIInclusive iter,
                     java.util.function.Function<java.util.Vector<HTMLNode>,​DotPair> getSeeAlso)
        
        Inserts a CSS Class Tag into each HTML "Anchor" (<A HREF=...>) and each HTML "Code" (<CODE>) Element found in each and every "See Also" section found on the java-doc web-page.
        Parameters:
        iter - This iterates over the particular method or constructor details sections on the page
        getSeeAlso - This is a java lambda function-pointer for retrieving the section.
        Returns:
        This method shall return the total number of CSS ID and CLASS attributes / inner-tags that were added to this vectorized-html page.
        See Also:
        TagNodeFind, TagNode.appendCSSClass(String, SD), TC.OpeningTags, SD.SingleQuotes, AbstractHNLI.set(Vector), CSS_CLASS_FOR_SEE_ALSO, COMMA_SPAN
        Code:
        Exact Method Body:
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
         int numCSSAttributesAdded = 0;
        
         while (iter.hasNext())
         {
             Vector<HTMLNode>    v       = iter.next();
             DotPair             seeAlso = getSeeAlso.apply(v);
        
             HTMLNode n;   TagNode tn;   TextNode tx;
        
             // Many, many constructors, methods and fields will not have a "See Also" tag.
             if (seeAlso == null) continue;
        
             // Retrieve each of the <CODE> and <A HREF> tags..  These are the "See Also" definitions.
             int[] posArr = TagNodeFind.all(v, seeAlso.start, seeAlso.end, TC.OpeningTags, "a", "code");
        
             // Iterate over each See-Also Link.
             // There are HTML 'Anchor' Tags: <A HREF=...> ... </A>
             // And also HTML 'Code' Tags: <CODE> ... </CODE>
             // Add the same CSS Class to both of these.
             for (int pos : posArr)
             {
                 // Replace the Opening HTML '<CODE>' tag with a '<CODE CLASS="COLORIZEDPSEEALSO">' tag.
                 tn = (TagNode) v.elementAt(pos);
                 tn = tn.appendCSSClass(CSS_CLASS_FOR_SEE_ALSO, SD.SingleQuotes);
                 v.setElementAt(tn, pos);
                 numCSSAttributesAdded++;
             }
        
             // Above, the CSS Style directive "display: block;" forces each of the "See Also" suggestions
             // to occur on separate lines.  Now, we no longer need the 'comma'.  Must get rid of it.
             // Here, that means wrapping it in a style="display: hidden;" <SPAN>...</SPAN>>
             posArr = TagNodeFind.all(v, seeAlso.start, seeAlso.end, TC.ClosingTags, "a");
             for (int i=(posArr.length-1); i >= 0; i--)
             {
                 int pos = posArr[i];
                 if ((n = v.elementAt(pos + 1)) instanceof TextNode)
                     if ((tx = (TextNode) n).str.startsWith(","))
                     {
                         v.setElementAt(new TextNode(tx.str.substring(1)), pos + 1);
                         v.addAll(pos + 1, COMMA_SPAN);
                         numCSSAttributesAdded++;
                     }
             }
        
             // Replace the old "See Also Definition" section with the new, updated section.
             // The Iterator does an excellent job of replacing HTML sections with new, updated ones.
             iter.set(v);
         }
        
         return numCSSAttributesAdded;