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

changeset 2006
044721d4d359
parent 1981
7fb27bc201cc
child 2101
933ba3f81a87
equal deleted inserted replaced
2005:b94824ddcbb6 2006:044721d4d359
189 public void printFramesetDocument(String title, boolean noTimeStamp, 189 public void printFramesetDocument(String title, boolean noTimeStamp,
190 Content frameset) throws IOException { 190 Content frameset) throws IOException {
191 Content htmlDocType = DocType.FRAMESET; 191 Content htmlDocType = DocType.FRAMESET;
192 Content htmlComment = new Comment(configuration.getText("doclet.New_Page")); 192 Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
193 Content head = new HtmlTree(HtmlTag.HEAD); 193 Content head = new HtmlTree(HtmlTag.HEAD);
194 if (! noTimeStamp) { 194 head.addContent(getGeneratedBy(!noTimeStamp));
195 Content headComment = new Comment(getGeneratedByString());
196 head.addContent(headComment);
197 }
198 if (configuration.charset.length() > 0) { 195 if (configuration.charset.length() > 0) {
199 Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE, 196 Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
200 configuration.charset); 197 configuration.charset);
201 head.addContent(meta); 198 head.addContent(meta);
202 } 199 }
208 Content htmlDocument = new HtmlDocument(htmlDocType, 205 Content htmlDocument = new HtmlDocument(htmlDocType,
209 htmlComment, htmlTree); 206 htmlComment, htmlTree);
210 write(htmlDocument); 207 write(htmlDocument);
211 } 208 }
212 209
213 protected String getGeneratedByString() { 210 protected Comment getGeneratedBy(boolean timestamp) {
214 Calendar calendar = new GregorianCalendar(TimeZone.getDefault()); 211 String text = "Generated by javadoc"; // marker string, deliberately not localized
215 Date today = calendar.getTime(); 212 if (timestamp) {
216 return "Generated by javadoc ("+ ConfigurationImpl.BUILD_DATE + ") on " + today; 213 Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
214 Date today = calendar.getTime();
215 text += " ("+ ConfigurationImpl.BUILD_DATE + ") on " + today;
216 }
217 return new Comment(text);
217 } 218 }
218 } 219 }

mercurial