//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; }