47 |
import java.util.Enumeration; |
import java.util.Enumeration; |
48 |
import java.util.ResourceBundle; |
import java.util.ResourceBundle; |
49 |
|
|
|
import javax.swing.ImageIcon; |
|
50 |
import javax.swing.KeyStroke; |
import javax.swing.KeyStroke; |
51 |
import javax.swing.LookAndFeel; |
import javax.swing.LookAndFeel; |
52 |
import javax.swing.UIDefaults; |
import javax.swing.UIDefaults; |
54 |
import javax.swing.plaf.ColorUIResource; |
import javax.swing.plaf.ColorUIResource; |
55 |
import javax.swing.plaf.DimensionUIResource; |
import javax.swing.plaf.DimensionUIResource; |
56 |
import javax.swing.plaf.FontUIResource; |
import javax.swing.plaf.FontUIResource; |
|
import javax.swing.plaf.IconUIResource; |
|
57 |
import javax.swing.plaf.InsetsUIResource; |
import javax.swing.plaf.InsetsUIResource; |
58 |
import javax.swing.text.JTextComponent; |
import javax.swing.text.JTextComponent; |
59 |
|
|
67 |
static final long serialVersionUID = -6096995660290287879L; |
static final long serialVersionUID = -6096995660290287879L; |
68 |
|
|
69 |
/** |
/** |
70 |
* Constructor BasicLookAndFeel |
* Creates a new instance of the Basic look and feel. |
71 |
*/ |
*/ |
72 |
public BasicLookAndFeel() |
public BasicLookAndFeel() |
73 |
{ |
{ |
75 |
} |
} |
76 |
|
|
77 |
/** |
/** |
78 |
* getDefaults |
* Creates and returns a new instance of the default resources for this look |
79 |
* @return UIDefaults |
* and feel. |
80 |
|
* |
81 |
|
* @return The UI defaults. |
82 |
*/ |
*/ |
83 |
public UIDefaults getDefaults() |
public UIDefaults getDefaults() |
84 |
{ |
{ |
95 |
} |
} |
96 |
|
|
97 |
/** |
/** |
98 |
* initClassDefaults |
* Populates the <code>defaults</code> table with mappings between class IDs |
99 |
* @param value0 TODO |
* and fully qualified class names for the UI delegates. |
100 |
|
* |
101 |
|
* @param defaults the defaults table (<code>null</code> not permitted). |
102 |
*/ |
*/ |
103 |
protected void initClassDefaults(UIDefaults defaults) |
protected void initClassDefaults(UIDefaults defaults) |
104 |
{ |
{ |
157 |
} |
} |
158 |
|
|
159 |
/** |
/** |
160 |
* initSystemColorDefaults |
* Populates the <code>defaults</code> table with system color defaults. |
161 |
* @param defaults TODO |
* |
162 |
|
* @param defaults the defaults table (<code>null</code> not permitted). |
163 |
*/ |
*/ |
164 |
protected void initSystemColorDefaults(UIDefaults defaults) |
protected void initSystemColorDefaults(UIDefaults defaults) |
165 |
{ |
{ |
201 |
} |
} |
202 |
|
|
203 |
/** |
/** |
204 |
* loadSystemColors |
* Loads the system colors. This method is not implemented yet. |
205 |
* @param defaults TODO |
* |
206 |
* @param value1 TODO |
* @param defaults the defaults table (<code>null</code> not permitted). |
207 |
* @param value2 TODO |
* @param systemColors TODO |
208 |
|
* @param useNative TODO |
209 |
*/ |
*/ |
210 |
protected void loadSystemColors(UIDefaults defaults, String[] value1, |
protected void loadSystemColors(UIDefaults defaults, String[] systemColors, |
211 |
boolean value2) |
boolean useNative) |
212 |
{ |
{ |
213 |
// TODO |
// TODO |
214 |
} |
} |
236 |
|
|
237 |
/** |
/** |
238 |
* initComponentDefaults |
* initComponentDefaults |
239 |
* @param defaults TODO |
* @param defaults the defaults table (<code>null</code> not permitted). |
240 |
*/ |
*/ |
241 |
protected void initComponentDefaults(UIDefaults defaults) |
protected void initComponentDefaults(UIDefaults defaults) |
242 |
{ |
{ |
843 |
"TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), |
"TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), |
844 |
"TableHeader.foreground", new ColorUIResource(darkShadow), |
"TableHeader.foreground", new ColorUIResource(darkShadow), |
845 |
|
|
846 |
"TextArea.background", new ColorUIResource(light), |
"TextArea.background", new ColorUIResource(light), |
847 |
"TextArea.border", new BasicBorders.MarginBorder(), |
"TextArea.border", new BasicBorders.MarginBorder(), |
848 |
"TextArea.caretBlinkRate", new Integer(500), |
"TextArea.caretBlinkRate", new Integer(500), |
849 |
"TextArea.caretForeground", new ColorUIResource(Color.black), |
"TextArea.caretForeground", new ColorUIResource(Color.black), |
884 |
0), |
0), |
885 |
"notify-field-accept"), |
"notify-field-accept"), |
886 |
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, |
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, |
887 |
InputEvent.SHIFT_DOWN_MASK), |
InputEvent.SHIFT_DOWN_MASK), |
888 |
"selection-backward"), |
"selection-backward"), |
889 |
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, |
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, |
890 |
InputEvent.SHIFT_DOWN_MASK), |
InputEvent.SHIFT_DOWN_MASK), |
891 |
"selection-forward"), |
"selection-forward"), |
892 |
}, |
}, |
893 |
"TextField.margin", new InsetsUIResource(0, 0, 0, 0), |
"TextField.margin", new InsetsUIResource(0, 0, 0, 0), |
894 |
"TextField.selectionBackground", new ColorUIResource(Color.black), |
"TextField.selectionBackground", new ColorUIResource(Color.black), |