-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid excessive repaint operations when figure is not modified #250
Avoid excessive repaint operations when figure is not modified #250
Conversation
Objects.equals() was added with Java 7. There's a pretty good chance the code predates this method. |
Why were none of the test results uploaded? 🤔 |
I'll try to create some tests today, to make sure that everything is still running as it should. |
6cb7f64
to
1c7cd7d
Compare
When updating the border or the background/foreground color of a figure, it may happen what we whole figure is repainted, even though it hasn't been modified. Additional checks have been added to check for equality in the setter methods, to limit the amount of times repaint() and revalidate() is called.
1c7cd7d
to
78926c5
Compare
@azoitl Your thoughts on this one? I'm currently in the process of cleaning up the duplicate code in our own Figure implementation and noticed that we have some additional checks in our setBounds() and setForeground/BackgroundColor() methods that might be worth being merged into GEF itself. |
@ptziegler during debugging GEF applications a always noticed lots of notifications on different levels. I mostly thought it is due to my lack of understanding or correctly using GEF. So bringing down repaints and notifications is something that seems desireable for me. If @Phillipus also agrees I would merge it. |
It looks good to me, and there's a lot of work gone into creating new tests. (In fact, thanks to @ptziegler it reminds me that I need to make more use of |
Thx for the feedback. Yes I agree the tests are amazing.
Me too. |
When updating the border or the background/foreground color of a figure,
it may happen what we whole figure is repainted, even though it hasn't
been modified.
Additional checks have been added to check for equality in the setter
methods, to limit the amount of times repaint() and revalidate() is
called.