[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: New method for HTMLEditorKit
From: |
Meskauskas Audrius |
Subject: |
[cp-patches] FYI: New method for HTMLEditorKit |
Date: |
Wed, 19 Oct 2005 20:56:21 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
2005-10-19 Audrius Meskauskas <address@hidden>
* javax/swing/text/html/HTMLEditorKit.java (getParser): New method.
Index: javax/swing/text/html/HTMLEditorKit.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/text/html/HTMLEditorKit.java,v
retrieving revision 1.6
diff -u -r1.6 HTMLEditorKit.java
--- javax/swing/text/html/HTMLEditorKit.java 19 Oct 2005 14:57:32 -0000
1.6
+++ javax/swing/text/html/HTMLEditorKit.java 19 Oct 2005 18:52:48 -0000
@@ -79,7 +79,7 @@
)
throws IOException;
}
-
+
/**
* The "hook" that receives all information about the HTML document
* structure while parsing it. The methods are invoked by parser
@@ -254,15 +254,26 @@
* The "ident paragraph right" action.
*/
public static final String PARA_INDENT_RIGHT = "html-para-indent-right";
-
+
/**
* Create a text storage model for this type of editor.
- *
+ *
* @return the model
*/
public Document createDefaultDocument()
{
HTMLDocument document = new HTMLDocument();
return document;
+ }
+
+ /**
+ * Get the parser that this editor kit uses for reading HTML streams. This
+ * method can be overridden to use the alternative parser.
+ *
+ * @return the HTML parser (by default, address@hidden ParserDelegator}).
+ */
+ protected Parser getParser()
+ {
+ return new ParserDelegator();
}
}
- [cp-patches] FYI: New method for HTMLEditorKit,
Meskauskas Audrius <=