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

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

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

revision 1.1.2.5 by gnu_andrew, Wed Nov 2 00:44:01 2005 UTC revision 1.1.2.6 by gnu_andrew, Sun Nov 27 21:00:41 2005 UTC
# Line 48  import java.beans.PropertyChangeListener Line 48  import java.beans.PropertyChangeListener
48  import javax.swing.JButton;  import javax.swing.JButton;
49  import javax.swing.JComponent;  import javax.swing.JComponent;
50  import javax.swing.JScrollBar;  import javax.swing.JScrollBar;
 import javax.swing.UIDefaults;  
51  import javax.swing.UIManager;  import javax.swing.UIManager;
52  import javax.swing.plaf.ComponentUI;  import javax.swing.plaf.ComponentUI;
53  import javax.swing.plaf.basic.BasicScrollBarUI;  import javax.swing.plaf.basic.BasicScrollBarUI;
# Line 195  public class MetalScrollBarUI extends Ba Line 194  public class MetalScrollBarUI extends Ba
194     */     */
195    protected JButton createDecreaseButton(int orientation)    protected JButton createDecreaseButton(int orientation)
196    {    {
197      UIDefaults defaults = UIManager.getLookAndFeelDefaults();      scrollBarWidth = UIManager.getInt("ScrollBar.width");
     scrollBarWidth = defaults.getInt("ScrollBar.width");  
198      decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,      decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,
199              isFreeStanding);              isFreeStanding);
200      return decreaseButton;      return decreaseButton;
# Line 213  public class MetalScrollBarUI extends Ba Line 211  public class MetalScrollBarUI extends Ba
211     */     */
212    protected JButton createIncreaseButton(int orientation)    protected JButton createIncreaseButton(int orientation)
213    {    {
214      UIDefaults defaults = UIManager.getLookAndFeelDefaults();      scrollBarWidth = UIManager.getInt("ScrollBar.width");
     scrollBarWidth = defaults.getInt("ScrollBar.width");  
215      increaseButton = new MetalScrollButton(orientation, scrollBarWidth,      increaseButton = new MetalScrollButton(orientation, scrollBarWidth,
216              isFreeStanding);              isFreeStanding);
217      return increaseButton;      return increaseButton;
# Line 403  public class MetalScrollBarUI extends Ba Line 400  public class MetalScrollBarUI extends Ba
400        }        }
401            
402      // draw the shadow line      // draw the shadow line
403      UIDefaults def = UIManager.getLookAndFeelDefaults();      g.setColor(UIManager.getColor("ScrollBar.shadow"));
     g.setColor(def.getColor("ScrollBar.shadow"));  
404      g.drawLine(x + w, y + 1, x + w, y + h - 1);      g.drawLine(x + w, y + 1, x + w, y + h - 1);
405    
406    }    }
# Line 456  public class MetalScrollBarUI extends Ba Line 452  public class MetalScrollBarUI extends Ba
452        }        }
453            
454      // draw the shadow line      // draw the shadow line
455      UIDefaults def = UIManager.getLookAndFeelDefaults();      g.setColor(UIManager.getColor("ScrollBar.shadow"));
     g.setColor(def.getColor("ScrollBar.shadow"));  
456      g.drawLine(x + 1, y + h, x + w - 2, y + h);      g.drawLine(x + 1, y + h, x + w - 2, y + h);
457    }    }
458        

Legend:
Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.6

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