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

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

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

revision 1.14 by trebligd, Mon Sep 19 16:53:46 2005 UTC revision 1.15 by trebligd, Wed Oct 19 14:54:55 2005 UTC
# Line 98  public class BasicArrowButton extends JB Line 98  public class BasicArrowButton extends JB
98     */     */
99    transient Color highlight = Color.WHITE;    transient Color highlight = Color.WHITE;
100    
   /** The border around the ArrowButton. */  
   private transient Border buttonBorder = new Border()  
     {  
       public Insets getBorderInsets(Component c)  
       {  
         return new Insets(2, 2, 2, 2);  
       }  
   
       public boolean isBorderOpaque()  
       {  
         return true;  
       }  
   
       public void paintBorder(Component c, Graphics g, int x, int y, int w,  
                               int h)  
       {  
         Color saved = g.getColor();  
         AbstractButton b = (AbstractButton) c;  
         if (b.getModel().isPressed())  
           {  
             g.setColor(darkShadow);  
             g.drawRect(x, y, x + w - 1, y + h - 1);  
           }  
         else  
           {  
             g.setColor(highlight);  
             g.drawLine(x + 1, y + 1, x + w - 3, y + 1);  
             g.drawLine(x + 1, y + 1, x + 1, y + h - 2);  
   
             g.setColor(shadow);  
             g.drawLine(x + 1, y + h - 2, x + w - 1, y + h - 2);  
             g.drawLine(x + w - 2, y + 1, x + w - 2, y + h - 2);  
   
             g.setColor(darkShadow);  
             g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);  
             g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);  
   
             g.setColor(saved);  
           }  
       }  
     };  
   
101    /**    /**
102     * Creates a new BasicArrowButton object.     * Creates a new BasicArrowButton object.
103     *     *
# Line 148  public class BasicArrowButton extends JB Line 106  public class BasicArrowButton extends JB
106    public BasicArrowButton(int direction)    public BasicArrowButton(int direction)
107    {    {
108      super();      super();
     setBorder(buttonBorder);  
109      setDirection(direction);      setDirection(direction);
110    }    }
111    

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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