Source Code Cross Referenced for PackageIndexWriter.java in  » 6.0-JDK-Modules-com.sun » tools » com » sun » tools » doclets » formats » html » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules com.sun » tools » com.sun.tools.doclets.formats.html 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
003:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004:         *
005:         * This code is free software; you can redistribute it and/or modify it
006:         * under the terms of the GNU General Public License version 2 only, as
007:         * published by the Free Software Foundation.  Sun designates this
008:         * particular file as subject to the "Classpath" exception as provided
009:         * by Sun in the LICENSE file that accompanied this code.
010:         *
011:         * This code is distributed in the hope that it will be useful, but WITHOUT
012:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013:         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014:         * version 2 for more details (a copy is included in the LICENSE file that
015:         * accompanied this code).
016:         *
017:         * You should have received a copy of the GNU General Public License version
018:         * 2 along with this work; if not, write to the Free Software Foundation,
019:         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020:         *
021:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022:         * CA 95054 USA or visit www.sun.com if you need additional information or
023:         * have any questions.
024:         */
025:
026:        package com.sun.tools.doclets.formats.html;
027:
028:        import com.sun.tools.doclets.internal.toolkit.util.*;
029:        import com.sun.javadoc.*;
030:        import java.io.*;
031:        import java.util.*;
032:
033:        /**
034:         * Generate the package index page "overview-summary.html" for the right-hand
035:         * frame. A click on the package name on this page will update the same frame
036:         * with the "pacakge-summary.html" file for the clicked package.
037:         *
038:         * @author Atul M Dambalkar
039:         */
040:        public class PackageIndexWriter extends AbstractPackageIndexWriter {
041:
042:            /**
043:             * Root of the program structure. Used for "overview" documentation.
044:             */
045:            private RootDoc root;
046:
047:            /**
048:             * Map representing the group of packages as specified on the command line.
049:             *
050:             * @see Group
051:             */
052:            private Map groupPackageMap;
053:
054:            /**
055:             * List to store the order groups as specified on the command line.
056:             */
057:            private List groupList;
058:
059:            /**
060:             * Construct the PackageIndexWriter. Also constructs the grouping
061:             * information as provided on the command line by "-group" option. Stores
062:             * the order of groups specified by the user.
063:             *
064:             * @see Group
065:             */
066:            public PackageIndexWriter(ConfigurationImpl configuration,
067:                    String filename) throws IOException {
068:                super (configuration, filename);
069:                this .root = configuration.root;
070:                groupPackageMap = configuration.group.groupPackages(packages);
071:                groupList = configuration.group.getGroupList();
072:            }
073:
074:            /**
075:             * Generate the package index page for the right-hand frame.
076:             *
077:             * @param configuration the current configuration of the doclet.
078:             */
079:            public static void generate(ConfigurationImpl configuration) {
080:                PackageIndexWriter packgen;
081:                String filename = "overview-summary.html";
082:                try {
083:                    packgen = new PackageIndexWriter(configuration, filename);
084:                    packgen.generatePackageIndexFile(
085:                            "doclet.Window_Overview_Summary", true);
086:                    packgen.close();
087:                } catch (IOException exc) {
088:                    configuration.standardmessage.error(
089:                            "doclet.exception_encountered", exc.toString(),
090:                            filename);
091:                    throw new DocletAbortException();
092:                }
093:            }
094:
095:            /**
096:             * Print each package in separate rows in the index table. Generate link
097:             * to each package.
098:             *
099:             * @param pkg Package to which link is to be generated.
100:             */
101:            protected void printIndexRow(PackageDoc pkg) {
102:                if (pkg != null && pkg.name().length() > 0) {
103:                    trBgcolorStyle("white", "TableRowColor");
104:                    summaryRow(20);
105:                    bold();
106:                    printPackageLink(pkg, Util.getPackageName(pkg), false);
107:                    boldEnd();
108:                    summaryRowEnd();
109:                    summaryRow(0);
110:                    printSummaryComment(pkg);
111:                    summaryRowEnd();
112:                    trEnd();
113:                }
114:            }
115:
116:            /**
117:             * Depending upon the grouping information and their titles, generate
118:             * separate table indices for each package group.
119:             */
120:            protected void generateIndex() {
121:                for (int i = 0; i < groupList.size(); i++) {
122:                    String groupname = (String) groupList.get(i);
123:                    List list = (List) groupPackageMap.get(groupname);
124:                    if (list != null && list.size() > 0) {
125:                        printIndexContents((PackageDoc[]) list
126:                                .toArray(new PackageDoc[list.size()]),
127:                                groupname);
128:                    }
129:                }
130:            }
131:
132:            /**
133:             * Print the overview summary comment for this documentation. Print one line
134:             * summary at the top of the page and generate a link to the description,
135:             * which is generated at the end of this page.
136:             */
137:            protected void printOverviewHeader() {
138:                if (root.inlineTags().length > 0) {
139:                    printSummaryComment(root);
140:                    p();
141:                    bold(configuration.getText("doclet.See"));
142:                    br();
143:                    printNbsps();
144:                    printHyperLink("", "overview_description", configuration
145:                            .getText("doclet.Description"), true);
146:                    p();
147:                }
148:            }
149:
150:            /**
151:             * Print Html tags for the table for this package index.
152:             */
153:            protected void printIndexHeader(String text) {
154:                tableIndexSummary();
155:                tableHeaderStart("#CCCCFF");
156:                bold(text);
157:                tableHeaderEnd();
158:            }
159:
160:            /**
161:             * Print Html closing tags for the table for this package index.
162:             */
163:            protected void printIndexFooter() {
164:                tableEnd();
165:                p();
166:                space();
167:            }
168:
169:            /**
170:             * Print the overview comment as provided in the file specified by the
171:             * "-overview" option on the command line.
172:             */
173:            protected void printOverviewComment() {
174:                if (root.inlineTags().length > 0) {
175:                    anchor("overview_description");
176:                    p();
177:                    printInlineComment(root);
178:                    p();
179:                }
180:            }
181:
182:            /**
183:             * Call {@link #printOverviewComment()} and then genrate the tag information
184:             * as provided in the file specified by the "-overview" option on the
185:             * command line.
186:             */
187:            protected void printOverview() throws IOException {
188:                printOverviewComment();
189:                printTags(root);
190:            }
191:
192:            /**
193:             * Print the top text (from the -top option), the upper
194:             * navigation bar, and then the title (from the"-title"
195:             * option), at the top of page.
196:             */
197:            protected void printNavigationBarHeader() {
198:                printTop();
199:                navLinks(true);
200:                hr();
201:                printConfigurationTitle();
202:            }
203:
204:            /**
205:             * Print the lower navigation bar and the bottom text
206:             * (from the -bottom option) at the bottom of page.
207:             */
208:            protected void printNavigationBarFooter() {
209:                hr();
210:                navLinks(false);
211:                printBottom();
212:            }
213:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.