[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: JViewport system property
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] FYI: JViewport system property |
Date: |
Sat, 19 Nov 2005 20:04:41 +0100 |
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 <address@hidden>
> >
> > * 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?
signature.asc
Description: This is a digitally signed message part