1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
package javax.swing.plaf.basic;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
class BasicBorder extends MatteBorder
{
static Color BtnPointClr = new Color( 180, 180, 180);
BasicBorder()
{
super(5,5,5,5, null);
}
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
{
// System.out.println("PAINT-------------------------------------------BORDER");
if (g != null)
{
g.setColor( BtnPointClr);
g.draw3DRect( 0, 0, width-1, height-1, true);
}
}
}
class PanelBorder extends MatteBorder
{
PanelBorder()
{
super(5,5,5,5, null);
}
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
{
// System.out.println("PAINT-------------------------------------------BORDER");
super.paintBorder(c, g, x, y, width, height);
}
}
public class BasicDefaults extends UIDefaults
{
public BasicDefaults()
{
// System.out.println("BasicDefaults !!!!!!!!!!!!!!!!!!!!!!!!!");
put("JButton", new BasicButtonUI());
put("JLabel", new BasicLabelUI());
put("JPanel", new BasicPanelUI());
put("JCheckBox", new BasicCheckBoxUI());
put("JRadioButton", new BasicRadioButtonUI());
put("JToggleButton", new BasicToggleButtonUI());
put("JOptionPane", new BasicOptionPaneUI());
put("JList", new BasicListUI());
put("JTree", new BasicTreeUI());
put("JTextComponent", new BasicTextUI());
put("JTabbedPane", new BasicTabbedPaneUI());
put("JScrollPane", new BasicScrollPaneUI());
put("JViewport", new BasicViewportUI());
put("JButton.border", new BasicBorder());
put("JPanel.border", new PanelBorder());
put("JToggleButton.border", new PanelBorder());
put("JCheckBox.border", new PanelBorder());
put("JRadioButton.border", new PanelBorder());
}
}
|