classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: Patch for JEditorPane


From: Anthony Balkissoon
Subject: Re: [cp-patches] FYI: Patch for JEditorPane
Date: Thu, 08 Dec 2005 15:31:08 -0500

I wrote the functionality, but forgot to actually USE it.. so this new
patch actually makes JEditorPane by default use HTMLEditorKit when
needed.

This one is accompanied by
gnu.testlet.javax.swing.JEditorPane.ConstructorsAndTypes which
demonstrates the correct behaviour but which we do not pass yet because
of an AssertionError being thrown in the text classes.  This may be
happening because methods that should be overridden in the html packages
are not completed yet.

2005-12-08  Anthony Balkissoon  <address@hidden>

        * javax/swing/JEditorPane.java:
        (init): Changed to no-argument instead of taking in an EditorKit and
        passing it to setEditorKit.  Callers will have to call setEditorKit
        themselves.
        (JEditorPane()): Changed call to init to have no arguments, call
        setEditorKit after init.
        (JEditorPane(String, String)): Likewise.
        (JEditorPane(URL)): Don't call default constructor, call init and then
        setEditorKit using the appropriate EditorKit for text/html.

--Tony

On Thu, 2005-12-08 at 15:02 -0500, Anthony Balkissoon wrote:
> This patch accompanies the new tests in
> gnu.testlet.javax.swing.JEditorPane.ContentType
> 
> This patch makes JEditorPane handle different content types properly,
> using the appropriate EditorKit for different types.  This will allow
> Lillian and myself to write test apps for html using JEditorPane because
> now it will use HTMLEditorKit to display the content.
> 
> 2005-12-08  Anthony Balkissoon  <address@hidden>
> 
>       * javax/swing/JEditorPane.java:
>       (registerMap): New field.
>       (editorMap): New field.
>       (JEditorPane()): Call init instead of setEditorKit.
>       (JEditorPane(String, String)): Likewise.
>       (init): New method.
>       (createEditorKitForContentType): Implemented and documented.
>       (getEditorKitClassNameForContentType): Likewise.
>       (getEditorKitForContentType): Likewise.
>       (registerEditorKitForContentType): Likewise.
>       (replaceSelection): Call super (this is temporary until the real
>       implementation happens.  There is already a TODO noting that this needs
>       to be implemented.
>       (setEditorKitForContentType): Implemented and documented.
> 
> --Tony
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches

Attachment: JEditorPaneConstructorsFix.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]