70 |
import javax.swing.JOptionPane; |
import javax.swing.JOptionPane; |
71 |
import javax.swing.JPanel; |
import javax.swing.JPanel; |
72 |
import javax.swing.JTextField; |
import javax.swing.JTextField; |
73 |
|
import javax.swing.LookAndFeel; |
74 |
import javax.swing.SwingUtilities; |
import javax.swing.SwingUtilities; |
|
import javax.swing.UIDefaults; |
|
75 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
76 |
import javax.swing.border.Border; |
import javax.swing.border.Border; |
77 |
import javax.swing.plaf.ComponentUI; |
import javax.swing.plaf.ComponentUI; |
1156 |
*/ |
*/ |
1157 |
protected void installDefaults() |
protected void installDefaults() |
1158 |
{ |
{ |
1159 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
LookAndFeel.installColorsAndFont(optionPane, "OptionPane.background", |
1160 |
|
"OptionPane.foreground", |
1161 |
optionPane.setFont(defaults.getFont("OptionPane.font")); |
"OptionPane.font"); |
1162 |
optionPane.setBackground(defaults.getColor("OptionPane.background")); |
LookAndFeel.installBorder(optionPane, "OptionPane.border"); |
|
optionPane.setForeground(defaults.getColor("OptionPane.foreground")); |
|
|
optionPane.setBorder(defaults.getBorder("OptionPane.border")); |
|
1163 |
optionPane.setOpaque(true); |
optionPane.setOpaque(true); |
1164 |
|
|
1165 |
messageBorder = defaults.getBorder("OptionPane.messageAreaBorder"); |
messageBorder = UIManager.getBorder("OptionPane.messageAreaBorder"); |
1166 |
messageForeground = defaults.getColor("OptionPane.messageForeground"); |
messageForeground = UIManager.getColor("OptionPane.messageForeground"); |
1167 |
buttonBorder = defaults.getBorder("OptionPane.buttonAreaBorder"); |
buttonBorder = UIManager.getBorder("OptionPane.buttonAreaBorder"); |
1168 |
|
|
1169 |
minimumSize = defaults.getDimension("OptionPane.minimumSize"); |
minimumSize = UIManager.getDimension("OptionPane.minimumSize"); |
1170 |
|
|
1171 |
// FIXME: Image icons don't seem to work properly right now. |
// FIXME: Image icons don't seem to work properly right now. |
1172 |
// Once they do, replace the synthetic icons with these ones. |
// Once they do, replace the synthetic icons with these ones. |