Hi Mark,
Am Samstag, den 19.11.2005, 20:04 +0100 schrieb Mark Wielaard: > On Tue, 2005-11-15 at 21:23 +0100, Mark Wielaard wrote: > > On Tue, 2005-11-15 at 14:16 +0000, Roman Kennke wrote: > > > 2005-11-15 Roman Kennke <[EMAIL PROTECTED]> > > > > > > * javax/swing/JViewport.java > > > (JViewport): Recognize setting of a system property > > > gnu.javax.swing.JViewport for the scrollMode. > > > > > > --- javax/swing/JViewport.java 27 Oct 2005 17:20:22 -0000 1.34 > > > +++ javax/swing/JViewport.java 15 Nov 2005 14:12:41 -0000 > > > @@ -246,7 +246,18 @@ > > > public JViewport() > > > { > > > setOpaque(true); > > > - setScrollMode(BLIT_SCROLL_MODE); > > > + String scrollModeProp = > > > + System.getProperty("gnu.javax.swing.JViewport.scrollMode", > > > + "BLIT"); > > > > You want to use gnu.classpath.SystemProperties.getProperty() here for > > the (admittedly unlikely) case a JViewport is instantiated through code > > that doesn't have enough permissions for reading that system property. > > > > It might also be an idea to make scrollModeProp static and only > > instantiate it once for efficiency. Although that might be an > > optimization that isn't really worth it since I guess instantiating > > JViewPorts isn't don't that often. And it would prevent changing this > > programmaticaly per instance of course. If that is desirable. > > Ping. Any comments? I fixed this with the attached patch. 2005-11-21 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/JViewport.java (static_initializer): Initialize the defaultScrollMode here. (JViewport): Set the defaultScrollMode that was initialized in the static initializer. /Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches