diff options
author | Roman Kennke <roman@kennke.org> | 2006-09-29 14:36:54 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2006-09-29 14:36:54 +0000 |
commit | 4bf4895593deadf01bc48466c8adf6d3dc90767a (patch) | |
tree | bc2358162a578c7c9f4420c05def4958802d041a | |
parent | 5db43923130a892176fe0787b94a02b58cba4966 (diff) | |
download | classpath-4bf4895593deadf01bc48466c8adf6d3dc90767a.tar.gz |
2006-09-29 Roman Kennke <kennke@aicas.com>
PR 28929
* javax/swing/JViewport.java
(cinit): Renamed system property to gnu.swing.scrollmode
to avoid bloat. Default to BACKINGSTORE, this is much
more reliable.
(repaint): Forward repaint() to parent as is specified.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | javax/swing/JViewport.java | 21 |
2 files changed, 15 insertions, 15 deletions
@@ -1,3 +1,12 @@ +2006-09-29 Roman Kennke <kennke@aicas.com> + + PR 28929 + * javax/swing/JViewport.java + (cinit): Renamed system property to gnu.swing.scrollmode + to avoid bloat. Default to BACKINGSTORE, this is much + more reliable. + (repaint): Forward repaint() to parent as is specified. + 2006-08-29 Tania Bento <tbento@redhat.com> * javax/swing/plaf/basic/BasicTableUI.java diff --git a/javax/swing/JViewport.java b/javax/swing/JViewport.java index ae0bee27d..9fd14e80a 100644 --- a/javax/swing/JViewport.java +++ b/javax/swing/JViewport.java @@ -252,8 +252,7 @@ public class JViewport extends JComponent implements Accessible static { String scrollModeProp = - SystemProperties.getProperty("gnu.javax.swing.JViewport.scrollMode", - "BLIT"); + SystemProperties.getProperty("gnu.swing.scrollmode", "BACKINGSTORE"); if (scrollModeProp.equalsIgnoreCase("simple")) defaultScrollMode = SIMPLE_SCROLL_MODE; else if (scrollModeProp.equalsIgnoreCase("backingstore")) @@ -627,19 +626,11 @@ public class JViewport extends JComponent implements Accessible */ public void repaint(long tm, int x, int y, int w, int h) { -// Component parent = getParent(); -// if (parent != null) -// parent.repaint(tm, x + getX(), y + getY(), w, h); -// else -// super.repaint(tm, x, y, w, h); - - // The specs suggest to implement something like the above. This however - // breaks blit painting, because the parent (most likely a JScrollPane) - // clears the background of the offscreen area of the JViewport, thus - // destroying the pieces that we want to clip. So we simply call super here - // instead. - super.repaint(tm, x, y, w, h); - + Component parent = getParent(); + if (parent != null) + parent.repaint(tm, x + getX(), y + getY(), w, h); + else + super.repaint(tm, x, y, w, h); } protected void addImpl(Component comp, Object constraints, int index) |