Java Doc for ParserDelegator.java in  » Apache-Harmony-Java-SE » javax-package » javax » swing » text » html » 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 » Apache Harmony Java SE » javax package » javax.swing.text.html.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.text.html.HTMLEditorKit
   javax.swing.text.html.parser.ParserDelegator

ParserDelegator
public class ParserDelegator extends HTMLEditorKit.Parser implements Serializable(Code)
This class is a wrapper of DocumentParser .

Internally stores a reference to a DTD ( ParserDelegator.defaultDTD ) which is filled with html32.bdtd, a file located at the classpath with the default DTD content (HTML 3.2) in ASN1 format. Then, instances a DocumentParser with this dtd.

So, when the method ParserDelegator.parse(Readerjavax.swing.text.html.HTMLEditorKit.ParserCallbackboolean) parse(Reader, HTMLEditorKit.ParserCallback, boolean) is invoked, its "delegates" to a DocumentParser .



Constructor Summary
public  ParserDelegator()
     Sets ParserDelegator.defaultDTD with the html32.bdtd file by calling the method ParserDelegator.setDefaultDTD .

Method Summary
protected static  DTDcreateDTD(DTD dtd, String name)
     Reads the DTD content from the file called name + "bdtd" located in the classpath (if there is any) and fills the dtd with it.
public  voidparse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)
    
protected static synchronized  voidsetDefaultDTD()
     Sets the content of ParserDelegator.defaultDTD .


Constructor Detail
ParserDelegator
public ParserDelegator()(Code)
Sets ParserDelegator.defaultDTD with the html32.bdtd file by calling the method ParserDelegator.setDefaultDTD .




Method Detail
createDTD
protected static DTD createDTD(DTD dtd, String name)(Code)
Reads the DTD content from the file called name + "bdtd" located in the classpath (if there is any) and fills the dtd with it. Then, returns dtd.

The complete behavior is the following:
  1. Finds the resource (the ASN1 binary file) in the classpath by appending ".bdtd" to name.
  2. Creates an stream from this file and adds the information contained into dtd by calling its DTD.read(DataInputStream) method
  3. Returns the dtd

Notice that this method catches any Exception and ignores it. It's the same behavior as the reference implementation.
Parameters:
  dtd - the dtd to be filled
Parameters:
  name - the name of the file located in the classpath (without .bdtd) the dtd



parse
public void parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet) throws IOException(Code)
Simply calls the method javax.swing.text.html.parser.DocumentParser.parse(Readerjavax.swing.text.html.HTMLEditorKit.ParserCallbackboolean) parse(Reader, HTMLEditorKit.ParserCallback, boolean) of the wrapped javax.swing.text.html.parser.DocumentParser with the same arguments
Parameters:
  r - the reader
Parameters:
  cb - the callback
Parameters:
  ignoreCharSet - the ignoreCharSet
throws:
  IOException - if the DocumentParser propagates it



setDefaultDTD
protected static synchronized void setDefaultDTD()(Code)
Sets the content of ParserDelegator.defaultDTD . Internally, calls ParserDelegator.createDTD(DTDString) with ParserDelegator.defaultDTD and ParserDelegator.DEFAULT_DTD_NAME as arguments. Notice that ParserDelegator.defaultDTD is cached. It means that it's filled only once.



Fields inherited from javax.swing.text.html.HTMLEditorKit
final public static String BOLD_ACTION(Code)(Java Doc)
final public static String COLOR_ACTION(Code)(Java Doc)
final public static String DEFAULT_CSS(Code)(Java Doc)
final public static String FONT_CHANGE_BIGGER(Code)(Java Doc)
final public static String FONT_CHANGE_SMALLER(Code)(Java Doc)
final public static String IMG_ALIGN_BOTTOM(Code)(Java Doc)
final public static String IMG_ALIGN_MIDDLE(Code)(Java Doc)
final public static String IMG_ALIGN_TOP(Code)(Java Doc)
final public static String IMG_BORDER(Code)(Java Doc)
final public static String ITALIC_ACTION(Code)(Java Doc)
final public static String LOGICAL_STYLE_ACTION(Code)(Java Doc)
final public static String PARA_INDENT_LEFT(Code)(Java Doc)
final public static String PARA_INDENT_RIGHT(Code)(Java Doc)

Methods inherited from javax.swing.text.html.HTMLEditorKit
public Object clone()(Code)(Java Doc)
public Document createDefaultDocument()(Code)(Java Doc)
protected void createInputAttributes(Element elem, MutableAttributeSet set)(Code)(Java Doc)
public void deinstall(JEditorPane pane)(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public Action[] getActions()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public Cursor getDefaultCursor()(Code)(Java Doc)
public MutableAttributeSet getInputAttributes()(Code)(Java Doc)
public Cursor getLinkCursor()(Code)(Java Doc)
protected Parser getParser()(Code)(Java Doc)
public StyleSheet getStyleSheet()(Code)(Java Doc)
public ViewFactory getViewFactory()(Code)(Java Doc)
public void insertHTML(HTMLDocument doc, int offset, String html, int popDepth, int pushDepth, HTML.Tag insertTag) throws BadLocationException, IOException(Code)(Java Doc)
public void install(JEditorPane pane)(Code)(Java Doc)
public boolean isAutoFormSubmission()(Code)(Java Doc)
public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException(Code)(Java Doc)
public void setAutoFormSubmission(boolean auto)(Code)(Java Doc)
public void setDefaultCursor(Cursor cursor)(Code)(Java Doc)
public void setLinkCursor(Cursor cursor)(Code)(Java Doc)
public void setStyleSheet(StyleSheet ss)(Code)(Java Doc)
public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException(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.