classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Patches for several javax.swing.text files


From: Anthony Balkissoon
Subject: [cp-patches] FYI: Patches for several javax.swing.text files
Date: Thu, 05 Jan 2006 15:16:20 -0500

Here are some general fixes I made (and committed tests for) for the
text package while I was trying to correct DefaultStyledDocument's
behaviour.

2006-01-05  Anthony Balkissoon  <address@hidden>

        * javax/swing/JTextPane.java:
        (replaceSelection): If the document is an AbstractDocument, use replace
        rather than remove and insert.
        * javax/swing/event/EventListenerList.java:
        (getListeners): Reversed the order of the listeners to match the 
        reference implementation.
        * javax/swing/text/AbstractDocument.java:
        (insertString): Add the UndoableEdit from the content.insertString call
        to the DocumentEvent.
        (DefaultDocumentEvent.toString): Implemented.
        * javax/swing/text/DefaultCaret.java:
        (setDot): Make sure dot is > 0 and less than the length of the 
        document.
        * javax/swing/text/DefaultStyledDocument.java:
        (ElementBuffer.insertUpdate): Set the modified tag of the document 
        event when we get start and end tags.  This ensures that we create the
        proper BranchElements in endEdit().
        (ElementBuffer.insertUpdate): Added FIXME to handle 
        JoinFractureDirection case.
        (insertUpdate): Added code to check if we're inserting immediately 
        after a newline and to handle this case (create start and end tags). 
        Only change the direction of the first and last tags if they are of 
        type ContentType.
        (checkForInsertAfterNewline): New helper method.
        (handleInsertAfterNewline): Likewise.
        * javax/swing/text/View.java:
        (updateLayout): Avoid NPE by checking if shape is null.  Repaint 
        container.

--Tony

Attachment: TextFixes.diff
Description: Text Data


reply via email to

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