Skip to content
Snippets Groups Projects
Commit 25a0b11d authored by CHEVALIER Noemy's avatar CHEVALIER Noemy
Browse files

Ajout des différents thèmes

parent f2ba3bbf
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,9 @@ class ShukanParameters extends JFrame { ...@@ -13,6 +13,9 @@ class ShukanParameters extends JFrame {
private JButton changerdetheme, theme1, theme2, theme3, retour, changertouches, changercouleurs; private JButton changerdetheme, theme1, theme2, theme3, retour, changertouches, changercouleurs;
/** view of the app */ /** view of the app */
private ShukanView canvas; private ShukanView canvas;
/** Color background, text, hollydays*/
private Color BACK_COLOR, BACK_COLOR2, TEXT_COLOR, HOLLY_COLOR, INACTIVE_COLOR;
/** built a parameter window */ /** built a parameter window */
public ShukanParameters(String titre, ShukanView canvas) { public ShukanParameters(String titre, ShukanView canvas) {
super(titre); super(titre);
...@@ -43,28 +46,57 @@ class ShukanParameters extends JFrame { ...@@ -43,28 +46,57 @@ class ShukanParameters extends JFrame {
theme1 = new JButton("Thème sombre"); theme1 = new JButton("Thème sombre");
theme1.setPreferredSize(new Dimension(150, 25)); theme1.setPreferredSize(new Dimension(150, 25));
theme1.addActionListener(new ActionListener() { theme1.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
canvas.setBackgroundColor(Color.BLACK); for(int i = 0; i <= 6; i++){
} BACK_COLOR = new Color(51,51,51);
}); BACK_COLOR2 = new Color(102,102,102);
TEXT_COLOR = Color.WHITE;
HOLLY_COLOR = new Color(153, 0, 0);
INACTIVE_COLOR = new Color (204,204,204);
canvas.setBackgroundColor(BACK_COLOR, BACK_COLOR2);
canvas.setForeground(TEXT_COLOR, HOLLY_COLOR, INACTIVE_COLOR);
}
canvas.repaint();
}
});
theme2 = new JButton("Thème clair"); theme2 = new JButton("Thème clair");
theme2.setPreferredSize(new Dimension(150, 25)); theme2.setPreferredSize(new Dimension(150, 25));
/*theme2.addActionListener(new ActionListener() { theme2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEVent e) { public void actionPerformed(ActionEvent e) {
getContentPane().setBackground(Color.WHITE); for(int i = 0; i <= nbModules; i++){
} BACK_COLOR = new Color(102,102,102);
});*/ BACK_COLOR2 = new Color(153,153,153);
TEXT_COLOR = Color.BLACK;
HOLLY_COLOR = new Color(255,102,102);
INACTIVE_COLOR = new Color(51,51,51);
canvas.setBackgroundColor(BACK_COLOR, BACK_COLOR2);
canvas.setForeground(TEXT_COLOR, HOLLY_COLOR, INACTIVE_COLOR);
}
canvas.repaint();
}
});
theme3 = new JButton("Thème modéré"); theme3 = new JButton("Thème modéré");
theme3.setPreferredSize(new Dimension(150, 25)); theme3.setPreferredSize(new Dimension(150, 25));
/*theme3.addActionListener(new ActionListener() { theme3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEVent e) { public void actionPerformed(ActionEvent e) {
getContentPane().setBackground(Color.GRIS); for(int i = 0; i <= nbModules; i++){
} BACK_COLOR = new Color(226,226,226);
});*/ BACK_COLOR2 = Color.LIGHT_GRAY;
TEXT_COLOR = Color.BLACK;
HOLLY_COLOR = new Color (1.f, 0.8f, 0.7f);
INACTIVE_COLOR = new Color (0.5f, 0.5f, 0.5f);
canvas.setBackgroundColor(BACK_COLOR, BACK_COLOR2);
canvas.setForeground(TEXT_COLOR, HOLLY_COLOR, INACTIVE_COLOR);
}
canvas.repaint();
}
});
retour = new JButton("Retour"); retour = new JButton("Retour");
retour.setPreferredSize(new Dimension(150, 25)); retour.setPreferredSize(new Dimension(150, 25));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment