Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit 6dc4504

Browse files
ExplvExplv
authored andcommitted
- Dark GUI styling
1 parent 89bb0e8 commit 6dc4504

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+486
-232
lines changed

AIO/src/org/aio/gui/Gui.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package org.aio.gui;
22

33
import org.aio.gui.conf_man.ConfigManager;
4+
import org.aio.gui.styled_components.StyledJLabel;
5+
import org.aio.gui.styled_components.StyledJPanel;
46
import org.aio.gui.task_list.TaskList;
7+
import org.aio.gui.utils.ColourScheme;
58
import org.aio.tasks.Task;
69
import org.aio.tasks.TaskType;
710
import org.json.simple.JSONObject;
@@ -29,27 +32,27 @@ public Gui() {
2932
gui.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
3033
gui.setBackground(DARK_GREY);
3134

32-
JPanel mainPanel = new JPanel(new BorderLayout(0, 0));
35+
JPanel mainPanel = new StyledJPanel(new BorderLayout(0, 0));
3336
mainPanel.setBackground(DARK_GREY);
3437
mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20), null));
3538

36-
final JLabel titleLabel = new JLabel();
39+
final JLabel titleLabel = new StyledJLabel();
3740
titleLabel.setFont(new Font("Trebuchet MS", Font.BOLD, 26));
38-
titleLabel.setForeground(Color.WHITE);
41+
titleLabel.setForeground(ColourScheme.WHITE);
3942
titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
4043
titleLabel.setText("<html><span color='#33b5e5'>Explv</span>'s AIO</html>");
4144
mainPanel.add(titleLabel, BorderLayout.NORTH);
4245

43-
final JPanel controlsPanel = new JPanel();
46+
final JPanel controlsPanel = new StyledJPanel();
4447
controlsPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
4548
controlsPanel.setBackground(DARK_GREY);
4649
mainPanel.add(controlsPanel, BorderLayout.SOUTH);
4750

48-
final JPanel saveLoadPanel = new JPanel();
51+
final JPanel saveLoadPanel = new StyledJPanel();
4952
saveLoadPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
5053
saveLoadPanel.setBackground(DARK_GREY);
5154
controlsPanel.add(saveLoadPanel);
52-
saveLoadPanel.setBorder(BorderFactory.createTitledBorder(null, "Save / Load", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, Color.WHITE));
55+
saveLoadPanel.setBorder(BorderFactory.createTitledBorder(null, "Save / Load", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, ColourScheme.WHITE));
5356

5457
saveLoadPanel.add(createButtonPanel(
5558
"Save",
@@ -77,11 +80,11 @@ public Gui() {
7780

7881
taskList = new TaskList();
7982

80-
final JPanel addTaskPanel = new JPanel();
83+
final JPanel addTaskPanel = new StyledJPanel();
8184
addTaskPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
8285
addTaskPanel.setBackground(DARK_GREY);
8386
controlsPanel.add(addTaskPanel);
84-
addTaskPanel.setBorder(BorderFactory.createTitledBorder(null, "Add a Task", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, Color.WHITE));
87+
addTaskPanel.setBorder(BorderFactory.createTitledBorder(null, "Add a Task", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, ColourScheme.WHITE));
8588

8689
addTaskPanel.add(createButtonPanel(
8790
"Level",
@@ -140,11 +143,11 @@ public Gui() {
140143
));
141144
controlsPanel.add(createSpacerPanel());
142145

143-
final JPanel startPanel = new JPanel();
146+
final JPanel startPanel = new StyledJPanel();
144147
startPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
145148
startPanel.setBackground(DARK_GREY);
146149
controlsPanel.add(startPanel);
147-
startPanel.setBorder(BorderFactory.createTitledBorder(null, "Start", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, Color.WHITE));
150+
startPanel.setBorder(BorderFactory.createTitledBorder(null, "Start", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, ColourScheme.WHITE));
148151

149152
startPanel.add(createButtonPanel(
150153
"Start",
@@ -201,19 +204,19 @@ private boolean validate(final Container container) {
201204
}
202205

203206
private JPanel createSpacerPanel() {
204-
final JPanel panel = new JPanel(new BorderLayout(0, 0));
207+
final JPanel panel = new StyledJPanel(new BorderLayout(0, 0));
205208
panel.setBackground(DARK_GREY);
206209
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20), null));
207210
return panel;
208211
}
209212

210213
private JPanel createButtonPanel(final String label, final String toolTip, final String icon, final String rolloverIcon, ActionListener callback) {
211-
JPanel buttonPanel = new JPanel(new BorderLayout(0, 3));
214+
JPanel buttonPanel = new StyledJPanel(new BorderLayout(0, 3));
212215
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
213216
buttonPanel.setBackground(DARK_GREY);
214217

215-
final JLabel panelLabel = new JLabel();
216-
panelLabel.setForeground(Color.WHITE);
218+
final JLabel panelLabel = new StyledJLabel();
219+
panelLabel.setForeground(ColourScheme.WHITE);
217220
panelLabel.setHorizontalAlignment(SwingConstants.CENTER);
218221
panelLabel.setText(label);
219222
buttonPanel.add(panelLabel, BorderLayout.SOUTH);

AIO/src/org/aio/gui/activity_panels/AgilityActivityPanel.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import org.aio.activities.activity.Activity;
44
import org.aio.activities.skills.agility.AgilityActivity;
55
import org.aio.activities.skills.agility.AgilityCourse;
6+
import org.aio.gui.styled_components.StyledJComboBox;
7+
import org.aio.gui.styled_components.StyledJLabel;
8+
import org.aio.gui.styled_components.StyledJPanel;
69
import org.json.simple.JSONObject;
710

811
import javax.swing.*;
@@ -14,12 +17,12 @@ public class AgilityActivityPanel implements ActivityPanel {
1417
private JComboBox<AgilityCourse> courseSelector;
1518

1619
public AgilityActivityPanel() {
17-
mainPanel = new JPanel();
20+
mainPanel = new StyledJPanel();
1821
mainPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
1922

20-
mainPanel.add(new JLabel("Course:"));
23+
mainPanel.add(new StyledJLabel("Course:"));
2124

22-
courseSelector = new JComboBox<>(AgilityCourse.values());
25+
courseSelector = new StyledJComboBox<>(AgilityCourse.values());
2326
mainPanel.add(courseSelector);
2427
}
2528

AIO/src/org/aio/gui/activity_panels/CookingActivityPanel.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import org.aio.activities.skills.cooking.CookingItem;
66
import org.aio.activities.skills.cooking.CookingLocation;
77
import org.aio.activities.skills.cooking.CookingType;
8+
import org.aio.gui.styled_components.StyledJComboBox;
9+
import org.aio.gui.styled_components.StyledJLabel;
10+
import org.aio.gui.styled_components.StyledJPanel;
811
import org.json.simple.JSONObject;
912

1013
import javax.swing.*;
@@ -18,18 +21,18 @@ public class CookingActivityPanel implements ActivityPanel {
1821
private JComboBox<CookingItem> itemSelector;
1922

2023
public CookingActivityPanel() {
21-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
24+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2225

23-
mainPanel.add(new JLabel("Location:"));
24-
locationSelector = new JComboBox<>(CookingLocation.values());
26+
mainPanel.add(new StyledJLabel("Location:"));
27+
locationSelector = new StyledJComboBox<>(CookingLocation.values());
2528
mainPanel.add(locationSelector);
2629

27-
mainPanel.add(new JLabel("Type:"));
28-
typeSelector = new JComboBox<>(CookingLocation.values()[0].cookingObject.allowedCookingTypes);
30+
mainPanel.add(new StyledJLabel("Type:"));
31+
typeSelector = new StyledJComboBox<>(CookingLocation.values()[0].cookingObject.allowedCookingTypes);
2932
mainPanel.add(typeSelector);
3033

31-
mainPanel.add(new JLabel("Item:"));
32-
itemSelector = new JComboBox<>(CookingItem.getAllWithType(CookingLocation.values()[0].cookingObject.allowedCookingTypes[0]));
34+
mainPanel.add(new StyledJLabel("Item:"));
35+
itemSelector = new StyledJComboBox<>(CookingItem.getAllWithType(CookingLocation.values()[0].cookingObject.allowedCookingTypes[0]));
3336
mainPanel.add(itemSelector);
3437

3538
locationSelector.addActionListener(e -> {

AIO/src/org/aio/gui/activity_panels/CraftingActivityPanel.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import org.aio.activities.skills.crafting.CraftingActivity;
55
import org.aio.activities.skills.crafting.CraftingItem;
66
import org.aio.activities.skills.crafting.CraftingType;
7+
import org.aio.gui.styled_components.StyledJComboBox;
8+
import org.aio.gui.styled_components.StyledJLabel;
9+
import org.aio.gui.styled_components.StyledJPanel;
710
import org.aio.util.Location;
811
import org.json.simple.JSONObject;
912

@@ -18,18 +21,18 @@ public class CraftingActivityPanel implements ActivityPanel {
1821
private JComboBox<CraftingItem> itemSelector;
1922

2023
public CraftingActivityPanel() {
21-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
24+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2225

23-
mainPanel.add(new JLabel("Type:"));
24-
typeSelector = new JComboBox<>(CraftingType.values());
26+
mainPanel.add(new StyledJLabel("Type:"));
27+
typeSelector = new StyledJComboBox<>(CraftingType.values());
2528
mainPanel.add(typeSelector);
2629

27-
mainPanel.add(new JLabel("Location:"));
28-
locationSelector = new JComboBox<>(CraftingType.values()[0].locations);
30+
mainPanel.add(new StyledJLabel("Location:"));
31+
locationSelector = new StyledJComboBox<>(CraftingType.values()[0].locations);
2932
mainPanel.add(locationSelector);
3033

31-
mainPanel.add(new JLabel("Item:"));
32-
itemSelector = new JComboBox<>(CraftingItem.getItemsWithType(CraftingType.values()[0]));
34+
mainPanel.add(new StyledJLabel("Item:"));
35+
itemSelector = new StyledJComboBox<>(CraftingItem.getItemsWithType(CraftingType.values()[0]));
3336
mainPanel.add(itemSelector);
3437

3538
typeSelector.addActionListener(e -> {

AIO/src/org/aio/gui/activity_panels/FMActivityPanel.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import org.aio.activities.skills.firemaking.FMLocation;
55
import org.aio.activities.skills.firemaking.FiremakingActivity;
66
import org.aio.activities.skills.firemaking.Log;
7+
import org.aio.gui.styled_components.StyledJComboBox;
8+
import org.aio.gui.styled_components.StyledJLabel;
9+
import org.aio.gui.styled_components.StyledJPanel;
710
import org.json.simple.JSONObject;
811

912
import javax.swing.*;
@@ -16,14 +19,14 @@ public class FMActivityPanel implements ActivityPanel {
1619
private JComboBox<FMLocation> locationSelector;
1720

1821
public FMActivityPanel() {
19-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
22+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2023

21-
mainPanel.add(new JLabel("Log Type:"));
22-
logSelector = new JComboBox<>(Log.values());
24+
mainPanel.add(new StyledJLabel("Log Type:"));
25+
logSelector = new StyledJComboBox<>(Log.values());
2326
mainPanel.add(logSelector);
2427

25-
mainPanel.add(new JLabel("Location:"));
26-
locationSelector = new JComboBox<>(FMLocation.values());
28+
mainPanel.add(new StyledJLabel("Location:"));
29+
locationSelector = new StyledJComboBox<>(FMLocation.values());
2730
mainPanel.add(locationSelector);
2831
}
2932

AIO/src/org/aio/gui/activity_panels/FishingActivityPanel.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import org.aio.activities.skills.fishing.Fish;
55
import org.aio.activities.skills.fishing.FishingActivity;
66
import org.aio.activities.skills.fishing.FishingLocation;
7+
import org.aio.gui.styled_components.StyledJComboBox;
8+
import org.aio.gui.styled_components.StyledJLabel;
9+
import org.aio.gui.styled_components.StyledJPanel;
710
import org.aio.util.ResourceMode;
811
import org.json.simple.JSONObject;
912

@@ -18,19 +21,19 @@ public class FishingActivityPanel implements ActivityPanel {
1821
private JComboBox<ResourceMode> resourceModeSelector;
1922

2023
public FishingActivityPanel() {
21-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
24+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2225

23-
mainPanel.add(new JLabel("Fish:"));
26+
mainPanel.add(new StyledJLabel("Fish:"));
2427

25-
fishSelector = new JComboBox<>(Fish.values());
28+
fishSelector = new StyledJComboBox<>(Fish.values());
2629
mainPanel. add(fishSelector);
2730

28-
mainPanel.add(new JLabel("Location:"));
29-
locationSelector = new JComboBox<>(Fish.values()[0].locations);
31+
mainPanel.add(new StyledJLabel("Location:"));
32+
locationSelector = new StyledJComboBox<>(Fish.values()[0].locations);
3033
mainPanel.add(locationSelector);
3134

32-
mainPanel.add(new JLabel("Collection Mode:"));
33-
resourceModeSelector = new JComboBox<>(ResourceMode.values());
35+
mainPanel.add(new StyledJLabel("Collection Mode:"));
36+
resourceModeSelector = new StyledJComboBox<>(ResourceMode.values());
3437
mainPanel.add(resourceModeSelector);
3538

3639
fishSelector.addActionListener(e -> {

AIO/src/org/aio/gui/activity_panels/FletchActivityPanel.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import org.aio.activities.skills.fletching.FletchItem;
55
import org.aio.activities.skills.fletching.FletchItemType;
66
import org.aio.activities.skills.fletching.FletchingActivity;
7+
import org.aio.gui.styled_components.StyledJComboBox;
8+
import org.aio.gui.styled_components.StyledJLabel;
9+
import org.aio.gui.styled_components.StyledJPanel;
710
import org.json.simple.JSONObject;
811

912
import javax.swing.*;
@@ -16,14 +19,14 @@ public class FletchActivityPanel implements ActivityPanel {
1619
private JComboBox<FletchItem> itemSelector;
1720

1821
public FletchActivityPanel() {
19-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
22+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2023

21-
mainPanel.add(new JLabel("Type:"));
22-
typeSelector = new JComboBox<>(FletchItemType.values());
24+
mainPanel.add(new StyledJLabel("Type:"));
25+
typeSelector = new StyledJComboBox<>(FletchItemType.values());
2326
mainPanel.add(typeSelector);
2427

25-
mainPanel.add(new JLabel("Item:"));
26-
itemSelector = new JComboBox<>(FletchItem.getAllWithType(FletchItemType.values()[0]));
28+
mainPanel.add(new StyledJLabel("Item:"));
29+
itemSelector = new StyledJComboBox<>(FletchItem.getAllWithType(FletchItemType.values()[0]));
2730
mainPanel.add(itemSelector);
2831

2932
typeSelector.addActionListener(e ->

AIO/src/org/aio/gui/activity_panels/HerbloreActivityPanel.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import org.aio.activities.skills.herblore.herb_cleaning.HerbCleaningActivity;
77
import org.aio.activities.skills.herblore.potion_making.Potion;
88
import org.aio.activities.skills.herblore.potion_making.PotionMakingActivity;
9+
import org.aio.gui.styled_components.StyledJComboBox;
10+
import org.aio.gui.styled_components.StyledJLabel;
11+
import org.aio.gui.styled_components.StyledJPanel;
912
import org.json.simple.JSONObject;
1013

1114
import javax.swing.*;
@@ -19,25 +22,25 @@ public class HerbloreActivityPanel implements ActivityPanel {
1922
private JComboBox<Potion> potionSelector;
2023

2124
public HerbloreActivityPanel() {
22-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
25+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2326

24-
mainPanel.add(new JLabel("Type:"));
25-
typeSelector = new JComboBox<>(HerbloreType.values());
27+
mainPanel.add(new StyledJLabel("Type:"));
28+
typeSelector = new StyledJComboBox<>(HerbloreType.values());
2629
mainPanel.add(typeSelector);
2730

28-
JPanel herbPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
31+
JPanel herbPanel = new StyledJPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
2932
mainPanel.add(herbPanel);
3033

31-
herbPanel.add(new JLabel("Herb:"));
32-
herbSelector = new JComboBox<>(Herb.values());
34+
herbPanel.add(new StyledJLabel("Herb:"));
35+
herbSelector = new StyledJComboBox<>(Herb.values());
3336
herbPanel.add(herbSelector);
3437

35-
JPanel potionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
38+
JPanel potionPanel = new StyledJPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
3639
potionPanel.setVisible(false);
3740
mainPanel.add(potionPanel);
3841

39-
potionPanel.add(new JLabel("Potion:"));
40-
potionSelector = new JComboBox<>(Potion.values());
42+
potionPanel.add(new StyledJLabel("Potion:"));
43+
potionSelector = new StyledJComboBox<>(Potion.values());
4144
potionPanel.add(potionSelector);
4245

4346
typeSelector.addActionListener(e -> {

AIO/src/org/aio/gui/activity_panels/MiningActivityPanel.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import org.aio.activities.skills.mining.MiningActivity;
66
import org.aio.activities.skills.mining.Rock;
77
import org.aio.activities.skills.mining.RuneEssMiningActivity;
8+
import org.aio.gui.styled_components.StyledJComboBox;
9+
import org.aio.gui.styled_components.StyledJLabel;
10+
import org.aio.gui.styled_components.StyledJPanel;
811
import org.aio.util.ResourceMode;
912
import org.json.simple.JSONObject;
1013

@@ -19,20 +22,20 @@ public class MiningActivityPanel implements ActivityPanel {
1922
private JComboBox<ResourceMode> resourceModeSelector;
2023

2124
public MiningActivityPanel() {
22-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
25+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
2326

24-
mainPanel.add(new JLabel("Rock: "));
27+
mainPanel.add(new StyledJLabel("Rock: "));
2528

26-
rockSelector = new JComboBox<>(Rock.values());
29+
rockSelector = new StyledJComboBox<>(Rock.values());
2730
mainPanel.add(rockSelector);
2831

29-
JLabel mineLabel = new JLabel("Mine:");
32+
JLabel mineLabel = new StyledJLabel("Mine:");
3033
mainPanel.add(mineLabel);
31-
mineSelector = new JComboBox<>(Mine.getMinesWithRock(Rock.values()[0]));
34+
mineSelector = new StyledJComboBox<>(Mine.getMinesWithRock(Rock.values()[0]));
3235
mainPanel.add(mineSelector);
3336

34-
mainPanel.add(new JLabel("Collection Mode:"));
35-
resourceModeSelector = new JComboBox<>(ResourceMode.values());
37+
mainPanel.add(new StyledJLabel("Collection Mode:"));
38+
resourceModeSelector = new StyledJComboBox<>(ResourceMode.values());
3639
mainPanel.add(resourceModeSelector);
3740

3841
rockSelector.addActionListener(e -> {

AIO/src/org/aio/gui/activity_panels/MoneyMakingActivityPanel.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import org.aio.activities.activity.Activity;
44
import org.aio.activities.money_making.MoneyMakingType;
55
import org.aio.activities.money_making.flax_picking.FlaxPickingActivity;
6+
import org.aio.gui.styled_components.StyledJComboBox;
7+
import org.aio.gui.styled_components.StyledJLabel;
8+
import org.aio.gui.styled_components.StyledJPanel;
69
import org.json.simple.JSONObject;
710

811
import javax.swing.*;
@@ -14,10 +17,10 @@ public class MoneyMakingActivityPanel implements ActivityPanel {
1417
private JComboBox<MoneyMakingType> typeSelector;
1518

1619
public MoneyMakingActivityPanel() {
17-
mainPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
20+
mainPanel = new StyledJPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
1821

19-
mainPanel.add(new JLabel("Type:"));
20-
typeSelector = new JComboBox<>(MoneyMakingType.values());
22+
mainPanel.add(new StyledJLabel("Type:"));
23+
typeSelector = new StyledJComboBox<>(MoneyMakingType.values());
2124
mainPanel.add(typeSelector);
2225
}
2326

0 commit comments

Comments
 (0)