/[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.16 by trebligd, Fri Sep 16 08:58:01 2005 UTC revision 1.17 by rabbit78, Tue Sep 20 09:29:41 2005 UTC
# Line 44  import java.awt.Graphics; Line 44  import java.awt.Graphics;
44  import java.awt.Insets;  import java.awt.Insets;
45    
46  import javax.swing.AbstractButton;  import javax.swing.AbstractButton;
47    import javax.swing.BorderFactory;
48  import javax.swing.ButtonModel;  import javax.swing.ButtonModel;
49  import javax.swing.JInternalFrame;  import javax.swing.JInternalFrame;
50  import javax.swing.JMenu;  import javax.swing.JMenu;
# Line 84  public class MetalBorders Line 85  public class MetalBorders
85    private static Border textFieldBorder;    private static Border textFieldBorder;
86    
87    /**    /**
88       * The shared instance for getTextBorder().
89       */
90      private static Border textBorder;
91    
92      /**
93     * A MarginBorder that gets shared by multiple components.     * A MarginBorder that gets shared by multiple components.
94     * Created on demand by the private helper function {@link     * Created on demand by the private helper function {@link
95     * #getMarginBorder()}.     * #getMarginBorder()}.
# Line 166  public class MetalBorders Line 172  public class MetalBorders
172            }            }
173        }        }
174        else        else
175        {          {
176          // draw disabled border            // draw disabled border
177          g.setColor(MetalLookAndFeel.getControlDisabled());            g.setColor(MetalLookAndFeel.getInactiveControlTextColor());
178          g.drawRect(x, y, w - 2, h - 2);                      g.drawRect(x, y, w - 2, h - 2);          
179        }          }
180      }      }
181    
182      /**      /**
# Line 1147  public class MetalBorders Line 1153  public class MetalBorders
1153    public static Border getTextFieldBorder()    public static Border getTextFieldBorder()
1154    {    {
1155      if (textFieldBorder == null)      if (textFieldBorder == null)
1156        textFieldBorder = new TextFieldBorder();        {
1157            Border inner = getMarginBorder();
1158            Border outer = new TextFieldBorder();
1159            textFieldBorder = BorderFactory.createCompoundBorder(outer, inner);
1160          }
1161      return textFieldBorder;      return textFieldBorder;
1162    }    }
1163    
1164    /**    /**
1165       * Returns the border that is used for text components (except text fields,
1166       * which use {@link #getTextFieldBorder}.
1167       *
1168       * @return the border that is used for text components
1169       *
1170       * @since 1.3
1171       */
1172      public static Border getTextBorder()
1173      {
1174        if (textBorder == null)
1175          {
1176            Border inner = getMarginBorder();
1177            Border outer = new Flush3DBorder();
1178            textBorder =
1179              new BorderUIResource.CompoundBorderUIResource(outer, inner);
1180          }
1181        return textBorder;
1182      }
1183    
1184      /**
1185     * Returns a border for Toolbar buttons in the Metal Look & Feel.     * Returns a border for Toolbar buttons in the Metal Look & Feel.
1186     *     *
1187     * @return a border for Toolbar buttons in the Metal Look & Feel     * @return a border for Toolbar buttons in the Metal Look & Feel

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

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