18
18
import java .util .Optional ;
19
19
20
20
public class Gui {
21
-
22
- public static final Color DARK_GREY = Color .decode ("#181818" );
23
-
21
+
24
22
private JDialog gui ;
25
23
private TaskList taskList ;
26
24
@@ -31,10 +29,10 @@ public Gui() {
31
29
gui .setTitle ("Explv's AIO" );
32
30
gui .setModal (true );
33
31
gui .setModalityType (Dialog .ModalityType .DOCUMENT_MODAL );
34
- gui .setBackground (DARK_GREY );
32
+ gui .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
35
33
36
34
JPanel mainPanel = new StyledJPanel (new BorderLayout (0 , 0 ));
37
- mainPanel .setBackground (DARK_GREY );
35
+ mainPanel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
38
36
mainPanel .setBorder (BorderFactory .createEmptyBorder (20 , 20 , 20 , 10 ));
39
37
40
38
final JLabel titleLabel = new StyledJLabel ();
@@ -46,12 +44,12 @@ public Gui() {
46
44
47
45
final JPanel controlsPanel = new StyledJPanel ();
48
46
controlsPanel .setLayout (new FlowLayout (FlowLayout .CENTER , 5 , 5 ));
49
- controlsPanel .setBackground (DARK_GREY );
47
+ controlsPanel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
50
48
mainPanel .add (controlsPanel , BorderLayout .SOUTH );
51
49
52
50
final JPanel saveLoadPanel = new StyledJPanel ();
53
51
saveLoadPanel .setLayout (new FlowLayout (FlowLayout .CENTER , 5 , 5 ));
54
- saveLoadPanel .setBackground (DARK_GREY );
52
+ saveLoadPanel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
55
53
controlsPanel .add (saveLoadPanel );
56
54
saveLoadPanel .setBorder (
57
55
BorderFactory .createTitledBorder (
@@ -92,7 +90,7 @@ public Gui() {
92
90
93
91
final JPanel addTaskPanel = new StyledJPanel ();
94
92
addTaskPanel .setLayout (new FlowLayout (FlowLayout .CENTER , 5 , 5 ));
95
- addTaskPanel .setBackground (DARK_GREY );
93
+ addTaskPanel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
96
94
controlsPanel .add (addTaskPanel );
97
95
addTaskPanel .setBorder (
98
96
BorderFactory .createTitledBorder (
@@ -164,7 +162,7 @@ public Gui() {
164
162
165
163
final JPanel startPanel = new StyledJPanel ();
166
164
startPanel .setLayout (new FlowLayout (FlowLayout .CENTER , 5 , 5 ));
167
- startPanel .setBackground (DARK_GREY );
165
+ startPanel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
168
166
controlsPanel .add (startPanel );
169
167
startPanel .setBorder (
170
168
BorderFactory .createTitledBorder (
@@ -237,15 +235,15 @@ private boolean validate(final Container container) {
237
235
238
236
private JPanel createSpacerPanel () {
239
237
final JPanel panel = new StyledJPanel (new BorderLayout (0 , 0 ));
240
- panel .setBackground (DARK_GREY );
238
+ panel .setBackground (ColourScheme . DIALOG_BACKGROUND_GREY );
241
239
panel .setBorder (BorderFactory .createEmptyBorder (0 , 5 , 0 , 5 ));
242
240
return panel ;
243
241
}
244
242
245
243
private JPanel createButtonPanel (final String label , final String toolTip , final String icon , final String rolloverIcon , ActionListener callback ) {
246
244
JPanel buttonPanel = new StyledJPanel (new BorderLayout (0 , 3 ));
247
245
buttonPanel .setBorder (BorderFactory .createEmptyBorder (0 , 5 , 0 , 5 ));
248
- buttonPanel .setBackground ( DARK_GREY );
246
+ buttonPanel .setOpaque ( false );
249
247
250
248
final JLabel panelLabel = new StyledJLabel ();
251
249
panelLabel .setForeground (ColourScheme .WHITE );
@@ -254,7 +252,6 @@ private JPanel createButtonPanel(final String label, final String toolTip, final
254
252
buttonPanel .add (panelLabel , BorderLayout .SOUTH );
255
253
256
254
JButton button = IconButton .createButton (toolTip , icon , rolloverIcon , callback );
257
-
258
255
buttonPanel .add (button , BorderLayout .NORTH );
259
256
260
257
return buttonPanel ;
0 commit comments