/[classpath]/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by trebligd, Thu Oct 27 09:50:58 2005 UTC revision 1.5 by rabbit78, Tue Nov 1 22:48:10 2005 UTC
# Line 49  import javax.swing.plaf.basic.BasicScrol Line 49  import javax.swing.plaf.basic.BasicScrol
49  public class MetalScrollPaneUI  public class MetalScrollPaneUI
50    extends BasicScrollPaneUI    extends BasicScrollPaneUI
51  {  {
   
   // FIXME: maybe replace by a Map of instances when this becomes stateful  
   /** The shared UI instance for JScrollPanes. */  
   private static MetalScrollPaneUI instance = null;  
   
52    /**    /**
53     * Constructs a new instance of <code>MetalScrollPaneUI</code>.     * Constructs a new instance of <code>MetalScrollPaneUI</code>.
54     */     */
# Line 71  public class MetalScrollPaneUI Line 66  public class MetalScrollPaneUI
66     */     */
67    public static ComponentUI createUI(JComponent component)    public static ComponentUI createUI(JComponent component)
68    {    {
69      if (instance == null)      return new MetalScrollPaneUI();
       instance = new MetalScrollPaneUI();  
     return instance;  
70    }    }
71  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26