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

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

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

revision 1.15 by trebligd, Thu Sep 15 12:20:00 2005 UTC revision 1.16 by trebligd, Fri Sep 16 08:58:01 2005 UTC
# Line 130  public class MetalBorders Line 130  public class MetalBorders
130        Color light = MetalLookAndFeel.getWhite();        Color light = MetalLookAndFeel.getWhite();
131        Color middle = MetalLookAndFeel.getControl();        Color middle = MetalLookAndFeel.getControl();
132    
133        // draw dark border        if (c.isEnabled())
134        g.setColor(darkShadow);        {
135        g.drawRect(x, y, w - 2, h - 2);          // draw dark border
136            g.setColor(darkShadow);
137        if (!bmodel.isPressed())          g.drawRect(x, y, w - 2, h - 2);
138          {  
139            // draw light border          if (!bmodel.isPressed())
140            g.setColor(light);            {
141            g.drawRect(x + 1, y + 1, w - 2, h - 2);              // draw light border
142                g.setColor(light);
143            // draw crossing pixels of both borders              g.drawRect(x + 1, y + 1, w - 2, h - 2);
144            g.setColor(middle);  
145            g.drawRect(x + 1, y + h - 2, 0, 0);              // draw crossing pixels of both borders
146            g.drawRect(x + w - 2, y + 1, 0, 0);              g.setColor(middle);
147          }              g.drawRect(x + 1, y + h - 2, 0, 0);
148        else              g.drawRect(x + w - 2, y + 1, 0, 0);
149          {            }
150            // draw light border          else
151            g.setColor(light);            {
152            g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);              // draw light border
153            g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1);              g.setColor(light);
154                g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);
155            // draw shadow border              g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1);
156            g.setColor(middle);  
157            g.drawLine(x + 1, y + 1, x + w - 2, y + 1);              // draw shadow border
158            g.drawLine(x + 1, y + 1, x + 1, y + h - 2);              g.setColor(middle);
159                g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
160            // draw crossing pixels of both borders              g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
161            g.setColor(shadow);  
162            g.drawRect(x + 1, y + h - 2, 0, 0);              // draw crossing pixels of both borders
163            g.drawRect(x + w - 2, y + 1, 0, 0);              g.setColor(shadow);
164          }              g.drawRect(x + 1, y + h - 2, 0, 0);
165                g.drawRect(x + w - 2, y + 1, 0, 0);
166              }
167          }
168          else
169          {
170            // draw disabled border
171            g.setColor(MetalLookAndFeel.getControlDisabled());
172            g.drawRect(x, y, w - 2, h - 2);          
173          }
174      }      }
175    
176      /**      /**

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

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