revision
This commit is contained in:
@@ -2,11 +2,12 @@ import java.sql.*;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class BaseDeDonnees {
|
public class BaseDeDonnees {
|
||||||
|
|
||||||
private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr:3306/yolou";
|
private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr/val";
|
||||||
private static final String USER = "yolou";
|
private static final String USER = "val";
|
||||||
private static final String PASS = "serikhaneyolou";
|
private static final String PASS = "vali";
|
||||||
|
|
||||||
/** Connexion */
|
/** Connexion */
|
||||||
public static Connection getConnexion() throws SQLException {
|
public static Connection getConnexion() throws SQLException {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class CouleurList extends DefaultListCellRenderer {
|
|||||||
/** renvoie la couleur correspondant au nom affiché dans le menu */
|
/** renvoie la couleur correspondant au nom affiché dans le menu */
|
||||||
public static Color couleurDe(String nom) {
|
public static Color couleurDe(String nom) {
|
||||||
switch (nom) {
|
switch (nom) {
|
||||||
case "Bleu": return Color.CYAN;
|
case "Bleu": return Color.CYAN; // ou Color.BLUE si tu veux un bleu plus foncé
|
||||||
case "Rouge": return Color.RED;
|
case "Rouge": return Color.RED;
|
||||||
case "Vert": return Color.GREEN;
|
case "Vert": return Color.GREEN;
|
||||||
case "Jaune": return Color.YELLOW;
|
case "Jaune": return Color.YELLOW;
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ public class Main extends JFrame {
|
|||||||
|
|
||||||
public Main(){
|
public Main(){
|
||||||
super("Papillon");
|
super("Papillon");
|
||||||
|
|
||||||
|
// Taille fixe
|
||||||
|
setSize(350, 250);
|
||||||
|
setResizable(false);
|
||||||
|
setAlwaysOnTop(true);
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
// Titre en haut
|
// Titre en haut
|
||||||
@@ -87,9 +92,7 @@ try {
|
|||||||
root.add(barre, BorderLayout.SOUTH);
|
root.add(barre, BorderLayout.SOUTH);
|
||||||
setContentPane(root);
|
setContentPane(root);
|
||||||
|
|
||||||
// Taille fixe
|
|
||||||
setSize(350, 250);
|
|
||||||
setResizable(false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,10 +93,11 @@ public Rappel getRappel(){
|
|||||||
|
|
||||||
if (estSelectionne) {
|
if (estSelectionne) {
|
||||||
setBackground(Color.LIGHT_GRAY);
|
setBackground(Color.LIGHT_GRAY);
|
||||||
setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
|
setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
|
||||||
} else {
|
} else {
|
||||||
setBackground(Color.CYAN);
|
setBackground(couleur.couleurDe(r.getTheme()));
|
||||||
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 2));
|
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
@@ -107,12 +108,21 @@ public Rappel getRappel(){
|
|||||||
public void mouseReleased(MouseEvent e) {
|
public void mouseReleased(MouseEvent e) {
|
||||||
if (e.isPopupTrigger()) {
|
if (e.isPopupTrigger()) {
|
||||||
menu.show(e.getComponent(), e.getX(), e.getY());
|
menu.show(e.getComponent(), e.getX(), e.getY());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override public void mouseClicked(MouseEvent e) {}
|
@Override public void mouseClicked(MouseEvent e) {}
|
||||||
@Override public void mouseEntered(MouseEvent e) {}
|
@Override public void mouseEntered(MouseEvent e) {
|
||||||
@Override public void mouseExited(MouseEvent e) {}
|
setBackground(Color.LIGHT_GRAY);
|
||||||
|
setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
|
||||||
|
}
|
||||||
|
@Override public void mouseExited(MouseEvent e) {
|
||||||
|
if(!estSelectionne){
|
||||||
|
setBackground(couleur.couleurDe(r.getTheme()));
|
||||||
|
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user