61 * Constructor to construct FrameOutputWriter object. |
61 * Constructor to construct FrameOutputWriter object. |
62 * |
62 * |
63 * @param filename File to be generated. |
63 * @param filename File to be generated. |
64 */ |
64 */ |
65 public FrameOutputWriter(ConfigurationImpl configuration, |
65 public FrameOutputWriter(ConfigurationImpl configuration, |
66 String filename) throws IOException { |
66 DocPath filename) throws IOException { |
67 super(configuration, filename); |
67 super(configuration, filename); |
68 noOfPackages = configuration.packages.length; |
68 noOfPackages = configuration.packages.length; |
69 } |
69 } |
70 |
70 |
71 /** |
71 /** |
75 * the default first file for Html documents. |
75 * the default first file for Html documents. |
76 * @throws DocletAbortException |
76 * @throws DocletAbortException |
77 */ |
77 */ |
78 public static void generate(ConfigurationImpl configuration) { |
78 public static void generate(ConfigurationImpl configuration) { |
79 FrameOutputWriter framegen; |
79 FrameOutputWriter framegen; |
80 String filename = ""; |
80 DocPath filename = DocPath.empty; |
81 try { |
81 try { |
82 filename = "index.html"; |
82 filename = DocPaths.INDEX; |
83 framegen = new FrameOutputWriter(configuration, filename); |
83 framegen = new FrameOutputWriter(configuration, filename); |
84 framegen.generateFrameFile(); |
84 framegen.generateFrameFile(); |
85 framegen.close(); |
85 framegen.close(); |
86 } catch (IOException exc) { |
86 } catch (IOException exc) { |
87 configuration.standardmessage.error( |
87 configuration.standardmessage.error( |
90 throw new DocletAbortException(); |
90 throw new DocletAbortException(); |
91 } |
91 } |
92 } |
92 } |
93 |
93 |
94 /** |
94 /** |
95 * Generate the contants in the "index.html" file. Print the frame details |
95 * Generate the constants in the "index.html" file. Print the frame details |
96 * as well as warning if browser is not supporting the Html frames. |
96 * as well as warning if browser is not supporting the Html frames. |
97 */ |
97 */ |
98 protected void generateFrameFile() throws IOException { |
98 protected void generateFrameFile() throws IOException { |
99 Content frameset = getFrameDetails(); |
99 Content frameset = getFrameDetails(); |
100 if (configuration.windowtitle.length() > 0) { |
100 if (configuration.windowtitle.length() > 0) { |
153 * Add the FRAME tag for the frame that lists all packages. |
153 * Add the FRAME tag for the frame that lists all packages. |
154 * |
154 * |
155 * @param contentTree the content tree to which the information will be added |
155 * @param contentTree the content tree to which the information will be added |
156 */ |
156 */ |
157 private void addAllPackagesFrameTag(Content contentTree) { |
157 private void addAllPackagesFrameTag(Content contentTree) { |
158 HtmlTree frame = HtmlTree.FRAME("overview-frame.html", "packageListFrame", |
158 HtmlTree frame = HtmlTree.FRAME(DocPaths.OVERVIEW_FRAME.getPath(), |
159 configuration.getText("doclet.All_Packages")); |
159 "packageListFrame", configuration.getText("doclet.All_Packages")); |
160 contentTree.addContent(frame); |
160 contentTree.addContent(frame); |
161 } |
161 } |
162 |
162 |
163 /** |
163 /** |
164 * Add the FRAME tag for the frame that lists all classes. |
164 * Add the FRAME tag for the frame that lists all classes. |
165 * |
165 * |
166 * @param contentTree the content tree to which the information will be added |
166 * @param contentTree the content tree to which the information will be added |
167 */ |
167 */ |
168 private void addAllClassesFrameTag(Content contentTree) { |
168 private void addAllClassesFrameTag(Content contentTree) { |
169 HtmlTree frame = HtmlTree.FRAME("allclasses-frame.html", "packageFrame", |
169 HtmlTree frame = HtmlTree.FRAME(DocPaths.ALLCLASSES_FRAME.getPath(), |
170 configuration.getText("doclet.All_classes_and_interfaces")); |
170 "packageFrame", configuration.getText("doclet.All_classes_and_interfaces")); |
171 contentTree.addContent(frame); |
171 contentTree.addContent(frame); |
172 } |
172 } |
173 |
173 |
174 /** |
174 /** |
175 * Add the FRAME tag for the frame that describes the class in detail. |
175 * Add the FRAME tag for the frame that describes the class in detail. |
176 * |
176 * |
177 * @param contentTree the content tree to which the information will be added |
177 * @param contentTree the content tree to which the information will be added |
178 */ |
178 */ |
179 private void addClassFrameTag(Content contentTree) { |
179 private void addClassFrameTag(Content contentTree) { |
180 HtmlTree frame = HtmlTree.FRAME(configuration.topFile, "classFrame", |
180 HtmlTree frame = HtmlTree.FRAME(configuration.topFile.getPath(), "classFrame", |
181 configuration.getText("doclet.Package_class_and_interface_descriptions"), |
181 configuration.getText("doclet.Package_class_and_interface_descriptions"), |
182 SCROLL_YES); |
182 SCROLL_YES); |
183 contentTree.addContent(frame); |
183 contentTree.addContent(frame); |
184 } |
184 } |
185 } |
185 } |