Normand Briere
2019-10-20 49d9c15d375942997692f7fccfb697665d0cb59e
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//package povtree.gui;
 
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.metal.DefaultMetalTheme;
 
public class Theme extends DefaultMetalTheme
{
 
    public Theme()
    {
        setDefaultTheme();
    }
 
    public Theme(int theme[][])
    {
        primary1 = new ColorUIResource(theme[0][0], theme[0][1], theme[0][2]);
        primary2 = new ColorUIResource(theme[1][0], theme[1][1], theme[1][2]);
        primary3 = new ColorUIResource(theme[2][0], theme[2][1], theme[2][2]);
        secondary1 = new ColorUIResource(theme[3][0], theme[3][1], theme[3][2]);
        secondary2 = new ColorUIResource(theme[4][0], theme[4][1], theme[4][2]);
        secondary3 = new ColorUIResource(theme[5][0], theme[5][1], theme[5][2]);
        black = new ColorUIResource(theme[6][0], theme[6][1], theme[6][2]);
        white = new ColorUIResource(theme[7][0], theme[7][1], theme[7][2]);
    }
 
    public void setDefaultTheme()
    {
        primary1 = super.getPrimary1();
        primary2 = super.getPrimary2();
        primary3 = super.getPrimary3();
        secondary1 = super.getSecondary1();
        secondary2 = super.getSecondary2();
        secondary3 = super.getSecondary3();
        black = super.getBlack();
        white = super.getWhite();
    }
 
    protected ColorUIResource getPrimary1()
    {
        return primary1;
    }
 
    protected ColorUIResource getPrimary2()
    {
        return primary2;
    }
 
    protected ColorUIResource getPrimary3()
    {
        return primary3;
    }
 
    protected ColorUIResource getSecondary1()
    {
        return secondary1;
    }
 
    protected ColorUIResource getSecondary2()
    {
        return secondary2;
    }
 
    protected ColorUIResource getSecondary3()
    {
        return secondary3;
    }
 
    protected ColorUIResource getBlack()
    {
        return black;
    }
 
    protected ColorUIResource getWhite()
    {
        return white;
    }
 
    public ColorUIResource getPrimaryControlShadow()
    {
        return primary2;
    }
 
    public ColorUIResource getControlShadow()
    {
        return primary2;
    }
 
    private ColorUIResource primary1;
    private ColorUIResource primary2;
    private ColorUIResource primary3;
    private ColorUIResource secondary1;
    private ColorUIResource secondary2;
    private ColorUIResource secondary3;
    private ColorUIResource black;
    private ColorUIResource white;
}