langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Tue Mar 17 11:28:24 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Thu Mar 19 19:00:54 2009 -0700
@@ -37,6 +37,7 @@
*
* @since 1.2
* @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
*/
public class HtmlWriter extends PrintWriter {
@@ -67,6 +68,21 @@
protected boolean memberDetailsListPrinted;
/**
+ * Header for tables displaying packages and description..
+ */
+ protected final String[] packageTableHeader;
+
+ /**
+ * Summary for use tables displaying class and package use.
+ */
+ protected final String useTableSummary;
+
+ /**
+ * Column header for class docs displaying Modifier and Type header.
+ */
+ protected final String modifierTypeHeader;
+
+ /**
* Constructor.
*
* @param path The directory path to be created for this file
@@ -86,6 +102,15 @@
this.configuration = configuration;
htmlFilename = filename;
this.memberDetailsListPrinted = false;
+ packageTableHeader = new String[] {
+ configuration.getText("doclet.Package"),
+ configuration.getText("doclet.Description")
+ };
+ useTableSummary = configuration.getText("doclet.Use_Table_Summary",
+ configuration.getText("doclet.packages"));
+ modifierTypeHeader = configuration.getText("doclet.0_and_1",
+ configuration.getText("doclet.Modifier"),
+ configuration.getText("doclet.Type"));
}
/**
@@ -803,6 +828,26 @@
}
/**
+ * Print HTML <TABLE BORDER="border" WIDTH="width"
+ * CELLPADDING="cellpadding" CELLSPACING="cellspacing" SUMMARY="summary"> tag.
+ *
+ * @param border Border size.
+ * @param width Width of the table.
+ * @param cellpadding Cellpadding for the table cells.
+ * @param cellspacing Cellspacing for the table cells.
+ * @param summary Table summary.
+ */
+ public void table(int border, String width, int cellpadding,
+ int cellspacing, String summary) {
+ println(DocletConstants.NL +
+ "<TABLE BORDER=\"" + border +
+ "\" WIDTH=\"" + width +
+ "\" CELLPADDING=\"" + cellpadding +
+ "\" CELLSPACING=\"" + cellspacing +
+ "\" SUMMARY=\"" + summary + "\">");
+ }
+
+ /**
* Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding"
* CELLSPACING="cellspacing"> tag.
*
@@ -819,6 +864,23 @@
}
/**
+ * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding"
+ * CELLSPACING="cellspacing" SUMMARY="summary"> tag.
+ *
+ * @param border Border size.
+ * @param cellpadding Cellpadding for the table cells.
+ * @param cellspacing Cellspacing for the table cells.
+ * @param summary Table summary.
+ */
+ public void table(int border, int cellpadding, int cellspacing, String summary) {
+ println(DocletConstants.NL +
+ "<TABLE BORDER=\"" + border +
+ "\" CELLPADDING=\"" + cellpadding +
+ "\" CELLSPACING=\"" + cellspacing +
+ "\" SUMMARY=\"" + summary + "\">");
+ }
+
+ /**
* Print HTML <TABLE BORDER="border" WIDTH="width">
*
* @param border Border size.
@@ -913,6 +975,23 @@
}
/**
+ * Print <CAPTION CLASS="stylename"> tag. Adds a newline character
+ * at the end.
+ *
+ * @param stylename style to be applied.
+ */
+ public void captionStyle(String stylename) {
+ println("<CAPTION CLASS=\"" + stylename + "\">");
+ }
+
+ /**
+ * Print </CAPTION> tag. Add a newline character at the end.
+ */
+ public void captionEnd() {
+ println("</CAPTION>");
+ }
+
+ /**
* Print <TR BGCOLOR="color" CLASS="stylename"> tag. Adds a newline character
* at the end.
*
@@ -953,6 +1032,23 @@
}
/**
+ * Print <TH CLASS="stylename" SCOPE="scope" NOWRAP> tag.
+ *
+ * @param stylename style to be applied.
+ * @param scope the scope attribute.
+ */
+ public void thScopeNoWrap(String stylename, String scope) {
+ print("<TH CLASS=\"" + stylename + "\" SCOPE=\"" + scope + "\" NOWRAP>");
+ }
+
+ /*
+ * Returns a header for Modifier and Type column of a table.
+ */
+ public String getModifierTypeHeader() {
+ return modifierTypeHeader;
+ }
+
+ /**
* Print <TH align="align" COLSPAN=i> tag.
*
* @param align the align attribute.