[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: javax/swing/JScrollPane.java
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] FYI: javax/swing/JScrollPane.java |
Date: |
Wed, 22 Jun 2005 16:24:04 +0200 |
Hi,
On Wed, 2005-06-22 at 15:36 +0200, Mark Wielaard wrote:
> With my patch reapplied that issue goes away. And IDB starts up again.
> But according to bug #13439 "swing: regression with omniscient debugger"
> https://savannah.gnu.org/bugs/?func=detailitem&item_id=13439
> this isn't a full solution since IF YOU PATCH THE APPLICATION you can
> get it to show more stuff without my patch applied. I am not clear on
> why that is though. And I think we should not need application patching.
OK. Found it. It was like Lillian already said, the viewport was not
actually added in the constructor. The following patch makes sure it is
and that the scrollbars actually work. It also avoids any state change
events being fired in the constructor.
2005-06-22 Mark Wielaard <address@hidden>
Fixes bug #13439
* javax/swing/JScrollPane.java (JScrollPane(Component,int,int)):
Set viewport, view and scrollLostener manually.
With this applied ODB looks like Timo's screenshot:
http://protu.it.helsinki.fi/~lindi/odb-classpath-2005-06-14T21:00:00+0000.png
Does this patch look sane?
Cheers,
Mark
Index: javax/swing/JScrollPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JScrollPane.java,v
retrieving revision 1.21
diff -u -r1.21 JScrollPane.java
--- javax/swing/JScrollPane.java 20 Jun 2005 14:57:06 -0000 1.21
+++ javax/swing/JScrollPane.java 22 Jun 2005 14:23:20 -0000
@@ -588,7 +588,11 @@
setVerticalScrollBar(createVerticalScrollBar());
setHorizontalScrollBarPolicy(hsbPolicy);
setHorizontalScrollBar(createHorizontalScrollBar());
- setViewportView(view);
+ viewport = createViewport();
+ if (view != null)
+ getViewport().setView(view);
+ viewport.addChangeListener(scrollListener);
+ add(viewport);
setLayout(new ScrollPaneLayout());
setOpaque(false);
updateUI();
signature.asc
Description: This is a digitally signed message part