/[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.27 by trebligd, Thu Oct 27 09:50:58 2005 UTC revision 1.28 by rabbit78, Tue Nov 15 20:51:37 2005 UTC
# Line 56  import javax.swing.JTextField; Line 56  import javax.swing.JTextField;
56  import javax.swing.JToggleButton;  import javax.swing.JToggleButton;
57  import javax.swing.JToolBar;  import javax.swing.JToolBar;
58  import javax.swing.SwingConstants;  import javax.swing.SwingConstants;
 import javax.swing.UIDefaults;  
59  import javax.swing.UIManager;  import javax.swing.UIManager;
60  import javax.swing.border.AbstractBorder;  import javax.swing.border.AbstractBorder;
61  import javax.swing.border.Border;  import javax.swing.border.Border;
# Line 654  public class MetalBorders Line 653  public class MetalBorders
653          {          {
654            JOptionPane pane = (JOptionPane) f.getContentPane();            JOptionPane pane = (JOptionPane) f.getContentPane();
655            int type = pane.getMessageType();            int type = pane.getMessageType();
           UIDefaults defaults = UIManager.getLookAndFeelDefaults();  
656            if (type == JOptionPane.QUESTION_MESSAGE)            if (type == JOptionPane.QUESTION_MESSAGE)
657              {              {
658                Color bc = defaults.getColor(                Color bc = UIManager.getColor(
659                    "OptionPane.questionDialog.border.background");                    "OptionPane.questionDialog.border.background");
660                if (bc != null)                if (bc != null)
661                  g.setColor(bc);                  g.setColor(bc);
662              }              }
663            if (type == JOptionPane.WARNING_MESSAGE)            if (type == JOptionPane.WARNING_MESSAGE)
664              {              {
665                Color bc = defaults.getColor(                Color bc = UIManager.getColor(
666                    "OptionPane.warningDialog.border.background");                    "OptionPane.warningDialog.border.background");
667                if (bc != null)                if (bc != null)
668                  g.setColor(bc);                                g.setColor(bc);              
669              }              }
670            else if (type == JOptionPane.ERROR_MESSAGE)            else if (type == JOptionPane.ERROR_MESSAGE)
671              {              {
672                Color bc = defaults.getColor(                Color bc = UIManager.getColor(
673                    "OptionPane.errorDialog.border.background");                    "OptionPane.errorDialog.border.background");
674                if (bc != null)                if (bc != null)
675                  g.setColor(bc);                                g.setColor(bc);              

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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