01 
02 /*
03  *  JavaDoq 1.0 - DOCUment JAVA In Source
04  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.javadoq.com>
05  *  
06  *  This program is free software: you can redistribute it and/or modify
07  *  it under the terms of the GNU Affero General Public License as published by
08  *  the Free Software Foundation, either version 3 of the License, or
09  *  (at your option) any later version.
10  *  
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Affero General Public License for more details.
15  *  
16  *  You should have received a copy of the GNU Affero General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 package com.javadoq.html;
21 
22 import java.io.File;
23 
24 import com.javadoq.JavaDoq;
25 
26 /**
27  * <p>Creates "index.html" file.</p>
28  * <p>Note that a transformer of this type needs to close to close its target HTML file.</p>
29  * 
30  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.javadoq.com" target="_blank">http://www.javadoq.com</a>
31  */
32 public final class DoqHTMLIndex extends DoqHTMLFile
33 {
34     /**
35      * <p>Constructs a {@link DoqHTMLIndex} transformer.</p>
36      * <p>This constructor invokes its super constructor to create and open the target file
37      * and HTML body.</p>
38      * @param jdoq The {@link JavaDoq} environment for the transformer.
39      * @since 1.0
40      */
41     public DoqHTMLIndex(JavaDoq jdoq) {
42         super(jdoq, jdoq.dst + File.separator + "index.html", jdoq.title, null);
43         writeLine("<frameset cols=\"30%, 70%\">");
44         writeLine("<frameset rows=\"30%, 70%\">");
45         writeLine("<frame src=\"packages.html\" name=\"packages-frame\">");
46         writeLine("<frame src=\"allfiles.html\" name=\"package-frame\">");
47         writeLine("</frameset>");
48         writeLine("<frame src=\"overview.html\" name=\"source-frame\">");
49         writeLine("</frameset>");
50         writeLine("<noframes>");
51         writeLine("<h2>Frame Alert</h2>");
52         writeLine("<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.");
53         writeLine("</noframes>");
54     }
55 }