[cp-patches] FYI: New method for HTMLEditorKit

2005-10-19 Thread Meskauskas Audrius

2005-10-19  Audrius Meskauskas  <[EMAIL PROTECTED]>

* 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.java19 Oct 2005 14:57:32 -  
1.6
+++ javax/swing/text/html/HTMLEditorKit.java19 Oct 2005 18:52:48 -
@@ -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, [EMAIL PROTECTED] ParserDelegator}).
+   */
+  protected Parser getParser()
+  {
+return new ParserDelegator();
   }
 }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: New method for HTMLEditorKit

2005-10-19 Thread Andreas Tobler

Meskauskas Audrius wrote:

2005-10-19  Audrius Meskauskas  <[EMAIL PROTECTED]>

* javax/swing/text/html/HTMLEditorKit.java (getParser): New method.


I commited the obvious:

2005-10-19  Andreas Tobler  <[EMAIL PROTECTED]>

* javax/swing/text/html/HTMLEditorKit.java: Add missing import.


Index: javax/swing/text/html/HTMLEditorKit.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/text/html/HTMLEditorKit.java,v

retrieving revision 1.7
diff -u -r1.7 HTMLEditorKit.java
--- javax/swing/text/html/HTMLEditorKit.java19 Oct 2005 18:59:14 
- 1.7

+++ javax/swing/text/html/HTMLEditorKit.java19 Oct 2005 20:30:17 -
@@ -46,6 +46,7 @@
 import javax.swing.text.Document;
 import javax.swing.text.MutableAttributeSet;
 import javax.swing.text.StyledEditorKit;
+import javax.swing.text.html.parser.ParserDelegator;

 /**
  * This class is NOT implemented. This file currently holds only



___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches