/[classpath]/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java

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

revision 1.7 by mark, Thu Jul 22 19:45:39 2004 UTC revision 1.8 by mark, Sat Jul 31 22:56:54 2004 UTC
# Line 53  import javax.swing.plaf.ScrollPaneUI; Line 53  import javax.swing.plaf.ScrollPaneUI;
53  public class BasicScrollPaneUI extends ScrollPaneUI  public class BasicScrollPaneUI extends ScrollPaneUI
54    implements ScrollPaneConstants    implements ScrollPaneConstants
55  {  {
56      
57      public static ComponentUI createUI(final JComponent c)    public static ComponentUI createUI(final JComponent c)
58      {    {
59          return new BasicScrollPaneUI();      return new BasicScrollPaneUI();
60      }    }
61    
62    protected void installDefaults(JScrollPane p)    protected void installDefaults(JScrollPane p)
63    {    {
# Line 77  public class BasicScrollPaneUI extends S Line 77  public class BasicScrollPaneUI extends S
77      p.setBorder(null);      p.setBorder(null);
78    }    }
79            
80      public void installUI(final JComponent c)    public void installUI(final JComponent c)
81      {    {
82          super.installUI(c);      super.installUI(c);
83      this.installDefaults((JScrollPane)c);      this.installDefaults((JScrollPane)c);
84    }    }
85    
# Line 87  public class BasicScrollPaneUI extends S Line 87  public class BasicScrollPaneUI extends S
87    {    {
88      super.uninstallUI(c);      super.uninstallUI(c);
89      this.uninstallDefaults((JScrollPane)c);      this.uninstallDefaults((JScrollPane)c);
90      }    }
91        
92            
93      public Dimension getMinimumSize(JComponent c)    public Dimension getMinimumSize(JComponent c)
94      {    {
95          JScrollPane p = (JScrollPane ) c;      JScrollPane p = (JScrollPane ) c;
96          ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();      ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();
97          return sl.minimumLayoutSize(c);      return sl.minimumLayoutSize(c);
98      }    }
99    
100      public Dimension getPreferredSize(JComponent c)    public Dimension getPreferredSize(JComponent c)
101      {    {
102          JScrollPane p = (JScrollPane ) c;      JScrollPane p = (JScrollPane ) c;
103          ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();      ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();
104          return sl.preferredLayoutSize(c);      return sl.preferredLayoutSize(c);
105      }    }
106    
107    
108      public void paint(Graphics g, JComponent c)    public void paint(Graphics g, JComponent c)
109      {          {      
110        // do nothing; the normal painting-of-children algorithm, along with      // do nothing; the normal painting-of-children algorithm, along with
111        // ScrollPaneLayout, does all the relevant work.      // ScrollPaneLayout, does all the relevant work.
112      }    }
113  }  }
114    
115    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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