src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java

changeset 243
edd944553131
parent 184
905e151a185a
child 554
9d9f26857129
equal deleted inserted replaced
242:889ec3ddc91b 243:edd944553131
33 33
34 /** 34 /**
35 * Write the Constants Summary Page in HTML format. 35 * Write the Constants Summary Page in HTML format.
36 * 36 *
37 * @author Jamie Ho 37 * @author Jamie Ho
38 * @author Bhavesh Patel (Modified)
38 * @since 1.4 39 * @since 1.4
39 */ 40 */
40 public class ConstantsSummaryWriterImpl extends HtmlDocletWriter 41 public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
41 implements ConstantsSummaryWriter { 42 implements ConstantsSummaryWriter {
42 43
48 /** 49 /**
49 * The current class being documented. 50 * The current class being documented.
50 */ 51 */
51 private ClassDoc currentClassDoc; 52 private ClassDoc currentClassDoc;
52 53
54 private final String constantsTableSummary;
55
56 private final String[] constantsTableHeader;
57
53 /** 58 /**
54 * Construct a ConstantsSummaryWriter. 59 * Construct a ConstantsSummaryWriter.
55 * @param configuration the configuration used in this run 60 * @param configuration the configuration used in this run
56 * of the standard doclet. 61 * of the standard doclet.
57 */ 62 */
58 public ConstantsSummaryWriterImpl(ConfigurationImpl configuration) 63 public ConstantsSummaryWriterImpl(ConfigurationImpl configuration)
59 throws IOException { 64 throws IOException {
60 super(configuration, ConfigurationImpl.CONSTANTS_FILE_NAME); 65 super(configuration, ConfigurationImpl.CONSTANTS_FILE_NAME);
61 this.configuration = configuration; 66 this.configuration = configuration;
67 constantsTableSummary = configuration.getText("doclet.Constants_Table_Summary",
68 configuration.getText("doclet.Constants_Summary"));
69 constantsTableHeader = new String[] {
70 getModifierTypeHeader(),
71 configuration.getText("doclet.ConstantField"),
72 configuration.getText("doclet.Value")
73 };
62 } 74 }
63 75
64 /** 76 /**
65 * {@inheritDoc} 77 * {@inheritDoc}
66 */ 78 */
149 /** 161 /**
150 * Print the class name in the table heading. 162 * Print the class name in the table heading.
151 * @param classStr the heading to print. 163 * @param classStr the heading to print.
152 */ 164 */
153 protected void writeClassName(String classStr) { 165 protected void writeClassName(String classStr) {
154 table(1, 3, 0); 166 table(1, 3, 0, constantsTableSummary);
155 trBgcolorStyle("#EEEEFF", "TableSubHeadingColor"); 167 tableSubCaptionStart();
156 thAlignColspan("left", 3);
157 write(classStr); 168 write(classStr);
158 thEnd(); 169 tableCaptionEnd();
159 trEnd(); 170 summaryTableHeader(constantsTableHeader, "col");
160 } 171 }
161 172
162 private void tableFooter(boolean isHeader) { 173 private void tableFooter(boolean isHeader) {
163 fontEnd(); 174 fontEnd();
164 if (isHeader) { 175 if (isHeader) {

mercurial