Package Torello.JavaDoc.Annotations
Annotation Type JDHeaderBackgroundImg
-
@Target(TYPE) @Retention(SOURCE) public @interface JDHeaderBackgroundImg
Genuine Java Annotation:
This is the actual annotation that a user may place in a'.java'file. This annotation generates a Wood-Plank Background Image for a small header containing useful information about the Source-Code.
The comment you are looking at / reading right now was inserted into this JavaDoc Web-Page using this very Annotation. (A self-documenting annotation?)
The@JDHeaderBackgroundImgannotation may only be placed on a type Definition (or inner Type-Definition) - for example:class, interface, enum, recordor@interface(annotation).
Target:
Specifically:@Target(ElementType.TYPE)
has been placed on this@interfacedefinition!Java-Annotation: A Java-Annotation for inserting a Wooden-Plank Background Image at the top of a Java-Doc Page using External-HTML File's; the image used is configurable, and my be changed by assigning the Annotation-Element Values appropriately.
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Annotations/JDHeaderBackgroundImg.java
- Open New Browser-Tab: Torello/JavaDoc/Annotations/JDHeaderBackgroundImg.java
File Size: 5,918 Bytes Line Count: 127 '\n' Characters Found
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringDEFAULT_CSS_CLASSThis is the default CSS-Class used for the<DIV>that is inserted.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element String[]CSSClassString[]EmbedTagFileID
-
-
-
Field Detail
-
DEFAULT_CSS_CLASS
static final java.lang.String DEFAULT_CSS_CLASS
This is the default CSS-Class used for the<DIV>that is inserted.
-
-
Element Detail
-
CSSClass
java.lang.String[] CSSClass
This Annotation-Element is optional. It is intended to contain the CSS-Class the user would like associated with the Java-Doc Header-Background Image Divider (the'<DIV>'element).
This Optional-Element has a default-value, and that is to use a CSS-Class which contains an image of a "Dark Wooden Board" for a background-image. This image will serve as the background for an HTML divider'<DIV>'element that is placed at the top of the Java-Doc HTML Page for the type/class being annotated.
Note that thedefaultvalue for this element is, indeed, an EmptyString[]-Array. The JavaDoc Upgrader will interpret this as a request to use the defaultCSS CLASS, which is"JDWoodBoardDark". ClickDEFAULT_CSS_CLASSto view (or retrieve} thisString
IMPORTANT:
It is advisable not to change the default value for thisCSS CLASS. Though there shouldn't be any problems in using an alternate image, it will require (and, hopefully this is obvious) ... it will require writing your own definition for thatCSS-Classand inserting it into yourJavaDoc.cssstyle-definitions page.
MultipleCSS-Classes
This Annotation-Element is, indeed, aString[]-Array, rather than just a simple-String. You may choose to provide mltipleCSS-Classesto this Annotation, and if you do - the HTML-<DIV>will have a'CLASS'attribute with multipleCSS CLASS'sassigned.
This example shows assigning the default-background to a Javaclass. Since there is noEmbedTagFileIDassigned to that element, the default Dark Wooden Plank will be used as a background. The Ugrader will look for the external-HTML in the default-directory location, which is listed first (followed by the example)
"SrcPackageDirectory/upgrade-files/external-html/JDHBI/MyClass.html"
This example shows how to assign an alternate CSS-Class to the HTML<DIV>element that is inserted. In this example, two user-provided CSS classes are going to be applied to the<DIV>. Again, as in the previous example, the Ugrader will look for the External-HTML file in the default location:- Default:
- {}
-
-
-
EmbedTagFileID
java.lang.String[] EmbedTagFileID
This Annotation-Element is also optional. If used, it must contain a validFILE-IDthat is listed in either thePackage-Local, or theGlobalEmbed-Tags Map. ThisFILE-IDmaps to the external HTML File that contains the HTML which is to be inserted on top of the Header-Banner containing the background image.
If the Empty-String ("") is passed to this Annotation-Element, or if the default value (which is the Empty-String) is passed, then the JavaDoc Upgrader will look for the HTML inside the'upgrade-files/'directory:
"PackageSrcDirectory/upgrade-files/external-html/JDHBI/"
For a file-name that matches the name of the CIET / Type (The 'ClassName'), but ending with the suffix'.html'. For instance, in the following snippet:
The Upgrader would reference theexternal-html-ids.propertiesfile which contained the definition.- Default:
- {}
-
-