Java Doc for TableOfContents.java in  » Wiki-Engine » JAMWiki » org » jamwiki » parser » 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 » Wiki Engine » JAMWiki » org.jamwiki.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jamwiki.parser.TableOfContents

TableOfContents
public class TableOfContents (Code)
This class is used to generate a table of contents based on values passed in through the parser.

Inner Class :class TableOfContentsEntry

Field Summary
final public static  intSTATUS_NO_TOC
     Status indicating that the document being parsed does not allow a table of contents.
final public static  intSTATUS_TOC_INITIALIZED
     Status indicating that this TOC object has been initialized.
final public static  intSTATUS_TOC_UNINITIALIZED
     Status indicating that this TOC object has not yet been initialized.


Method Summary
public  voidaddEntry(String name, String text, int level)
     Add a new table of contents entry to the table of contents object. The entry should contain the name to use in the HTML anchor tag, the text to display in the table of contents, and the indentation level for the entry within the table of contents.
Parameters:
  name - The name of the entry, to be used in the anchor tag name.
Parameters:
  text - The text to display for the table of contents entry.
Parameters:
  level - The level of the entry.
public  StringattemptTOCInsertion()
     This method checks to see if a TOC is allowed to be inserted, and if so returns an HTML representation of the TOC.
public  StringcheckForUniqueName(String name)
     Verify the the TOC name is unique.
public  intgetStatus()
     Return the current table of contents status, such as "no table of contents allowed" or "uninitialized".
public  voidsetForceTOC(boolean forceTOC)
     Force a TOC to appear, even if there are fewer than four headings.
public  voidsetStatus(int status)
     Set the current table of contents status, such as "no table of contents allowed" or "uninitialized".
public  intsize()
     Return the number of entries in this TOC object.
public  StringtoHTML()
     Return an HTML representation of this table of contents object.

Field Detail
STATUS_NO_TOC
final public static int STATUS_NO_TOC(Code)
Status indicating that the document being parsed does not allow a table of contents.



STATUS_TOC_INITIALIZED
final public static int STATUS_TOC_INITIALIZED(Code)
Status indicating that this TOC object has been initialized. For the JFlex parser this will mean a __TOC__ tag has been added to the document being parsed.



STATUS_TOC_UNINITIALIZED
final public static int STATUS_TOC_UNINITIALIZED(Code)
Status indicating that this TOC object has not yet been initialized. For the JFlex parser this will mean no __TOC__ tag has been added to the document being parsed.





Method Detail
addEntry
public void addEntry(String name, String text, int level)(Code)
Add a new table of contents entry to the table of contents object. The entry should contain the name to use in the HTML anchor tag, the text to display in the table of contents, and the indentation level for the entry within the table of contents.
Parameters:
  name - The name of the entry, to be used in the anchor tag name.
Parameters:
  text - The text to display for the table of contents entry.
Parameters:
  level - The level of the entry. If an entry is a sub-heading ofanother entry the value should be 2. If there is a sub-heading of thatentry then its value would be 3, and so forth.



attemptTOCInsertion
public String attemptTOCInsertion()(Code)
This method checks to see if a TOC is allowed to be inserted, and if so returns an HTML representation of the TOC. An HTML representation of the current table of contents object,or an empty string if the table of contents can not be inserted dueto an inadequate number of entries or some other reason.



checkForUniqueName
public String checkForUniqueName(String name)(Code)
Verify the the TOC name is unique. If it is already in use append a numerical suffix onto it.
Parameters:
  name - The name to use in the TOC, unless it is already in use. A unique name for use in the TOC, of the form "name" or "name_1"if "name" is already in use.



getStatus
public int getStatus()(Code)
Return the current table of contents status, such as "no table of contents allowed" or "uninitialized". The current status of this table of contents object.



setForceTOC
public void setForceTOC(boolean forceTOC)(Code)
Force a TOC to appear, even if there are fewer than four headings.
Parameters:
  forceTOC - Set to true if a TOC is being forcedto appear, false otherwise.



setStatus
public void setStatus(int status)(Code)
Set the current table of contents status, such as "no table of contents allowed" or "uninitialized".
Parameters:
  status - The current status of this table of contents object.



size
public int size()(Code)
Return the number of entries in this TOC object. The number of entries in this table of contents object.



toHTML
public String toHTML()(Code)
Return an HTML representation of this table of contents object. An HTML representation of this table of contents object.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.