Source Code Cross Referenced for NamedJavaDocComponent.java in  » UML » jrefactory » org » acm » seguin » pretty » 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 » UML » jrefactory » org.acm.seguin.pretty 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Author:  Chris Seguin
003:         *
004:         *  This software has been developed under the copyleft
005:         *  rules of the GNU General Public License.  Please
006:         *  consult the GNU General Public License for more
007:         *  details about use and distribution of this software.
008:         */
009:        package org.acm.seguin.pretty;
010:
011:        /**
012:         *  Store a portion of a javadoc item
013:         *
014:         *@author     Chris Seguin
015:         *@created    April 15, 1999
016:         */
017:        public class NamedJavaDocComponent extends JavaDocComponent {
018:            //  Instance Variable
019:            private String id;
020:
021:            /**
022:             *  Create an instance of this java doc object
023:             */
024:            public NamedJavaDocComponent() {
025:                super ();
026:                id = "";
027:            }
028:
029:            /**
030:             *  Set the id
031:             *
032:             *@param  newID  the new id
033:             */
034:            public void setID(String newID) {
035:                if (newID != null) {
036:                    id = newID;
037:                    setLongestLength(getType().length() + id.length() + 2);
038:                }
039:            }
040:
041:            /**
042:             *  Return the id
043:             *
044:             *@return    the id
045:             */
046:            public String getID() {
047:                return id;
048:            }
049:
050:            /**
051:             *  Print this tag
052:             *
053:             *@param  printData  printData
054:             */
055:            public void print(PrintData printData) {
056:                //  We are now printing it
057:                setPrinted(true);
058:
059:                //  Start the line
060:                printData.indent();
061:                if (!printData.isStarsAlignedWithSlash()) {
062:                    printData.space();
063:                }
064:                printData.appendComment("*", PrintData.JAVADOC_COMMENT);
065:
066:                if (printData.isSpaceBeforeAt()) {
067:                    printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
068:                }
069:
070:                //  Print the type
071:                printData.appendComment(getType(), PrintData.JAVADOC_COMMENT);
072:                for (int i = 0; i < printData.getJavadocIndent(); ++i) {
073:                    printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
074:                }
075:
076:                //  Print the ID
077:                printData.appendComment(getID(), PrintData.JAVADOC_COMMENT);
078:
079:                if (!printData.isJavadocLinedUp() && getID().length() > 0) {
080:                    // Add a space after "param foo", "throws exc", etc.
081:                    printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
082:                } else if (printData.isKeepErroneousJavadocTags()
083:                        && getType().endsWith("error")) {
084:                    printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
085:                }
086:
087:                if (printData.isJavadocDescriptionLinedup()) {
088:                    LineUpIndent(printData);
089:                } else {
090:                    NoLineUpIndent(printData);
091:                }
092:
093:                printData.newline();
094:            }
095:
096:            /**
097:             *  The indent lines should line up
098:             *
099:             *@param  printData  the print data
100:             */
101:            private void LineUpIndent(PrintData printData) {
102:                if (printData.isJavadocLinedUp()) {
103:                    //  Pad extra spaces after the ID
104:                    int extra = getLongestLength()
105:                            - (getType().length() + getID().length()) - 1;
106:                    for (int ndx = 0; ndx < extra; ndx++) {
107:                        printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
108:                    }
109:
110:                    // word wrap the description with the proper indent
111:                    int indent = getLongestLength();
112:
113:                    if (printData.isSpaceBeforeAt()) {
114:                        // we need to take into account the leading space before "@" if present
115:                        indent++;
116:                    }
117:
118:                    wordwrapDescription(printData, indent);
119:                } else {
120:                    //  Print the description, no line up
121:                    printDescription(printData);
122:                }
123:            }
124:
125:            /**
126:             *  This is the old style javadoc line up
127:             *
128:             *@param  printData  the print data
129:             */
130:            private void NoLineUpIndent(PrintData printData) {
131:                if (printData.isJavadocLinedUp()) {
132:                    //  Pad extra spaces after the ID
133:                    int extra = getLongestLength()
134:                            - (getType().length() + getID().length());
135:                    for (int ndx = 0; ndx < extra; ndx++) {
136:                        printData.appendComment(" ", PrintData.JAVADOC_COMMENT);
137:                    }
138:                }
139:
140:                //  Print the description
141:                printDescription(printData);
142:            }
143:        }
144:        /*******\
145:         \*******/
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.