[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: PlainView update improvements
From: |
Anthony Balkissoon |
Subject: |
Re: [cp-patches] FYI: PlainView update improvements |
Date: |
Wed, 12 Oct 2005 14:10:36 -0400 |
Didn't include the patch. Here it is.
--Tony
On Wed, 2005-10-12 at 13:41 -0400, Anthony Balkissoon wrote:
> This patch fixes a number of issues with PlainView's updating
> facilities. First, changedUpdate is implemented and made to call the
> same method as insertUpdate and removeUpdate (so this package private
> method was renamed from insertOrRemoveUpdate to updateDamage).
>
> Also, this method (updateDamage) is improved because if no children are
> added or removed, it calls repaint only on the area containing the line
> that was changed (this is specified in the docs but wasn't implemented
> before). There was also a serious error in the bounds for the
> Document.getText call in this method that is now fixed.
>
> Finally, the protected method damageLineRange is implemented.
>
> Note that for the time being, the performance improvements from only
> painting the changed line are not seen because we are sending
> DocumentEvents with incorrect information, so when this method checks it
> finds that lines have been removed, even when they have not. I'm
> writing a testcase ATM to demonstrate this and I will file a bug/mauve
> testcase and then fix the problem.
>
>
> 2005-10-12 Anthony Balkissoon <address@hidden>
>
> * javax/swing/text/PlainView.java:
> (insertOrRemoveUpdate): Renamed this method to udpateDamage because
> changedUpdate calls it as well.
> (updateDamage): This method used to be named insertOrRemoveDamage.
> Changes are: If no children were added or removed, repaint only the
> area containing the line that was changed. Also, if children were
> added or removed, call repaint on the entire container. Also fixed a
> serious logic error in the bounds for Document.getText().
> (insertUpdate): Changed call from insertOrRemoveUpdate to updateDamage
> and removed repaint call (this is done in updateDamage).
> (removeUpdate): Likewise.
> (changedUpdate): Implemented.
> (damageLineRange): Implemented.
>
> --Tony
>
>
>
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
PlainViewUpdateFixes.diff
Description: Text Data