modified: bd.properties
modified: bd.script modified: bin/controleur/CtrlAccesListe.class new file: bin/controleur/CtrlSaisieMembre.class modified: bin/modele/Evenements.class modified: bin/modele/Membres.class modified: bin/modele/Participer.class new file: bin/vue/AjoutEntraineur.class new file: bin/vue/AjoutMembre.class new file: bin/vue/AjoutMembreBureau.class new file: bin/vue/AjoutPersonne$annulListener.class new file: bin/vue/AjoutPersonne$validListener.class new file: bin/vue/AjoutPersonne.class new file: bin/vue/MembreBureau$adeskListener.class new file: bin/vue/MembreBureau$aentraineurListener.class new file: bin/vue/MembreBureau$amembreListener.class new file: bin/vue/MembreBureau$sdeskListener.class new file: bin/vue/MembreBureau$sentraineurListener.class new file: bin/vue/MembreBureau$smembreListener.class new file: bin/vue/MembreBureau.class new file: bin/vue/SupprimerDesk.class new file: bin/vue/SupprimerEntraineur.class new file: bin/vue/SupprimerMembre.class new file: bin/vue/SupprimerPersonne$annulListener.class new file: bin/vue/SupprimerPersonne$validListener.class new file: bin/vue/SupprimerPersonne.class new file: src/CtrlAccesListe.java new file: src/CtrlLogin.java modified: src/controleur/CtrlAccesListe.java new file: src/controleur/CtrlSaisieMembre.java modified: src/modele/Evenements.java modified: src/modele/Membres.java modified: src/modele/Participer.java new file: src/vue/AjoutEntraineur.java new file: src/vue/AjoutMembre.java new file: src/vue/AjoutMembreBureau.java new file: src/vue/AjoutPersonne.java new file: src/vue/MembreBureau.java new file: src/vue/SupprimerDesk.java new file: src/vue/SupprimerEntraineur.java new file: src/vue/SupprimerMembre.java new file: src/vue/SupprimerPersonne.java
This commit is contained in:
parent
b8407efdf1
commit
fec65efd5e
@ -1,4 +1,4 @@
|
||||
#HSQL Database Engine 2.3.0
|
||||
#Wed Dec 04 11:32:45 CET 2013
|
||||
#Sun Dec 08 14:09:00 CET 2013
|
||||
version=2.3.0
|
||||
modified=no
|
||||
|
@ -36,7 +36,7 @@ SET SCHEMA PUBLIC
|
||||
CREATE MEMORY TABLE PUBLIC.MEMBRES(IDMEMBRE INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,NOM VARCHAR(20),PRENOM VARCHAR(20),ADRESSE VARCHAR(50),DTN DATE,NUMTEL VARCHAR(20),DROIT INTEGER,DATEADHESION DATE,PASSWORD VARCHAR(20))
|
||||
ALTER TABLE PUBLIC.MEMBRES ALTER COLUMN IDMEMBRE RESTART WITH 0
|
||||
CREATE MEMORY TABLE PUBLIC.EVENEMENTS(IDEVENEMENT INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,TYPE INTEGER,DATEE DATE,LIEU VARCHAR(20))
|
||||
ALTER TABLE PUBLIC.EVENEMENTS ALTER COLUMN IDEVENEMENT RESTART WITH 8
|
||||
ALTER TABLE PUBLIC.EVENEMENTS ALTER COLUMN IDEVENEMENT RESTART WITH 12
|
||||
CREATE MEMORY TABLE PUBLIC.PARTICIPER(IDEVENEMENT INTEGER,IDMEMBRE INTEGER,ROLE INTEGER,PRIMARY KEY(IDMEMBRE,IDEVENEMENT),FOREIGN KEY(IDMEMBRE) REFERENCES PUBLIC.MEMBRES(IDMEMBRE),FOREIGN KEY(IDEVENEMENT) REFERENCES PUBLIC.EVENEMENTS(IDEVENEMENT))
|
||||
CREATE MEMORY TABLE PUBLIC.DISCIPLINES(NOMDISIPLINE VARCHAR(20) PRIMARY KEY,IDEVENEMENT INTEGER,FOREIGN KEY(IDEVENEMENT) REFERENCES PUBLIC.EVENEMENTS(IDEVENEMENT))
|
||||
ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
|
||||
@ -58,3 +58,7 @@ INSERT INTO EVENEMENTS VALUES(4,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(5,0,'2013-10-12','lol')
|
||||
INSERT INTO EVENEMENTS VALUES(6,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(7,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(8,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(9,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(10,1,'2012-11-20','toulouse')
|
||||
INSERT INTO EVENEMENTS VALUES(11,0,'2013-10-12','lol')
|
||||
|
Binary file not shown.
BIN
bin/controleur/CtrlSaisieMembre.class
Normal file
BIN
bin/controleur/CtrlSaisieMembre.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/vue/AjoutEntraineur.class
Normal file
BIN
bin/vue/AjoutEntraineur.class
Normal file
Binary file not shown.
BIN
bin/vue/AjoutMembre.class
Normal file
BIN
bin/vue/AjoutMembre.class
Normal file
Binary file not shown.
BIN
bin/vue/AjoutMembreBureau.class
Normal file
BIN
bin/vue/AjoutMembreBureau.class
Normal file
Binary file not shown.
BIN
bin/vue/AjoutPersonne$annulListener.class
Normal file
BIN
bin/vue/AjoutPersonne$annulListener.class
Normal file
Binary file not shown.
BIN
bin/vue/AjoutPersonne$validListener.class
Normal file
BIN
bin/vue/AjoutPersonne$validListener.class
Normal file
Binary file not shown.
BIN
bin/vue/AjoutPersonne.class
Normal file
BIN
bin/vue/AjoutPersonne.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$adeskListener.class
Normal file
BIN
bin/vue/MembreBureau$adeskListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$aentraineurListener.class
Normal file
BIN
bin/vue/MembreBureau$aentraineurListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$amembreListener.class
Normal file
BIN
bin/vue/MembreBureau$amembreListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$sdeskListener.class
Normal file
BIN
bin/vue/MembreBureau$sdeskListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$sentraineurListener.class
Normal file
BIN
bin/vue/MembreBureau$sentraineurListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau$smembreListener.class
Normal file
BIN
bin/vue/MembreBureau$smembreListener.class
Normal file
Binary file not shown.
BIN
bin/vue/MembreBureau.class
Normal file
BIN
bin/vue/MembreBureau.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerDesk.class
Normal file
BIN
bin/vue/SupprimerDesk.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerEntraineur.class
Normal file
BIN
bin/vue/SupprimerEntraineur.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerMembre.class
Normal file
BIN
bin/vue/SupprimerMembre.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerPersonne$annulListener.class
Normal file
BIN
bin/vue/SupprimerPersonne$annulListener.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerPersonne$validListener.class
Normal file
BIN
bin/vue/SupprimerPersonne$validListener.class
Normal file
Binary file not shown.
BIN
bin/vue/SupprimerPersonne.class
Normal file
BIN
bin/vue/SupprimerPersonne.class
Normal file
Binary file not shown.
62
src/CtrlAccesListe.java
Normal file
62
src/CtrlAccesListe.java
Normal file
@ -0,0 +1,62 @@
|
||||
import java.awt.Container;
|
||||
import java.awt.FlowLayout;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import vue.Planning;
|
||||
|
||||
import modele.Evenements;
|
||||
|
||||
|
||||
public class CtrlAccesListe {
|
||||
|
||||
public static void main(String[] args) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException{
|
||||
Evenements e;
|
||||
ResultSet r;
|
||||
|
||||
JFrame f_planning ;
|
||||
Planning p ;
|
||||
|
||||
f_planning = new JFrame("Planning") ;
|
||||
p = new Planning() ;
|
||||
|
||||
Container c = f_planning.getContentPane();
|
||||
c.setLayout(new FlowLayout());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// cr<EFBFBD>e le planning <EFBFBD> la date actuelle
|
||||
c.add(p);
|
||||
/*
|
||||
// c.add(new Planning(2012, 4, 20)) ;
|
||||
p.color_date(11) ;
|
||||
p.color_date(20) ;*/
|
||||
|
||||
f_planning.pack();
|
||||
// f_planning.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
f_planning.setVisible(true);
|
||||
f_planning.setResizable(false) ;
|
||||
|
||||
|
||||
e = new Evenements();
|
||||
|
||||
e.setEvenement("2012-11-20", 1, "toulouse");
|
||||
r = e.getEvenement(-1);
|
||||
|
||||
while(r.next())
|
||||
{
|
||||
String str[]=r.getString("dateE").split("-");
|
||||
|
||||
p.color_date(Integer.decode( str[2]));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
10
src/CtrlLogin.java
Normal file
10
src/CtrlLogin.java
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
public class CtrlLogin {
|
||||
//attributs
|
||||
|
||||
//Constructeurs
|
||||
|
||||
//méthodes
|
||||
|
||||
|
||||
}
|
@ -26,10 +26,6 @@ public class CtrlAccesListe {
|
||||
Container c = f_planning.getContentPane();
|
||||
c.setLayout(new FlowLayout());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// cr<EFBFBD>e le planning <EFBFBD> la date actuelle
|
||||
c.add(p);
|
||||
/*
|
||||
@ -43,6 +39,7 @@ public class CtrlAccesListe {
|
||||
f_planning.setResizable(false) ;
|
||||
|
||||
|
||||
//ajout d'un evenemebts test
|
||||
e = new Evenements();
|
||||
|
||||
e.setEvenement("2012-11-20", 1, "toulouse");
|
||||
|
15
src/controleur/CtrlSaisieMembre.java
Normal file
15
src/controleur/CtrlSaisieMembre.java
Normal file
@ -0,0 +1,15 @@
|
||||
package controleur;
|
||||
|
||||
import vue.AjoutPersonne;
|
||||
|
||||
public class CtrlSaisieMembre {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
AjoutPersonne fen = new AjoutPersonne("Ajout nouveau membre", 500, 500);
|
||||
|
||||
fen.setVisible(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -15,6 +15,16 @@ public class Evenements {
|
||||
public Evenements(){};
|
||||
|
||||
//méthodes
|
||||
/**
|
||||
* permet l'ajout d'un evenement
|
||||
* @param pDate
|
||||
* @param pType
|
||||
* @param pLieu
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws ClassNotFoundException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void setEvenement(String pDate, int pType, String pLieu) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
|
||||
{
|
||||
//connexion à la base
|
||||
|
@ -102,6 +102,14 @@ public class Membres {
|
||||
return resultat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permet de supprimer un membre a partir de don id
|
||||
* @param pIdMembre
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws ClassNotFoundException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void supprimer(int pIdMembre) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
|
||||
{
|
||||
Statement statement;
|
||||
|
@ -112,6 +112,15 @@ public class Participer {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* retourne une liste de participants (id) pour un evenement (id)
|
||||
* @param pIdEvenement
|
||||
* @return
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws ClassNotFoundException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public ResultSet getListeParticipants(int pIdEvenement) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
|
||||
{
|
||||
Statement statement;
|
||||
@ -136,6 +145,15 @@ public class Participer {
|
||||
return resultat;
|
||||
}
|
||||
|
||||
/**
|
||||
* permet d'obtenir une liste d'evenements auquel participe un membre (id)
|
||||
* @param pIdMembre
|
||||
* @return
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws ClassNotFoundException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public ResultSet getListeParticipation (int pIdMembre) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
|
||||
{
|
||||
Statement statement;
|
||||
|
17
src/vue/AjoutEntraineur.java
Normal file
17
src/vue/AjoutEntraineur.java
Normal file
@ -0,0 +1,17 @@
|
||||
package vue;
|
||||
|
||||
|
||||
/*
|
||||
* Classe permettant de definir le role de la personne ajout<EFBFBD>e en tant qu'entraieneur
|
||||
*/
|
||||
|
||||
public class AjoutEntraineur extends AjoutPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public AjoutEntraineur(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 1;
|
||||
}
|
||||
}
|
16
src/vue/AjoutMembre.java
Normal file
16
src/vue/AjoutMembre.java
Normal file
@ -0,0 +1,16 @@
|
||||
package vue;
|
||||
|
||||
/*
|
||||
* Classe permettant de definir le role de la personne ajout<EFBFBD>e en tant que simple membre
|
||||
*/
|
||||
|
||||
public class AjoutMembre extends AjoutPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public AjoutMembre(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 2;
|
||||
}
|
||||
}
|
16
src/vue/AjoutMembreBureau.java
Normal file
16
src/vue/AjoutMembreBureau.java
Normal file
@ -0,0 +1,16 @@
|
||||
package vue;
|
||||
|
||||
/*
|
||||
* Classe permettant de definir le role de la personne ajout<EFBFBD>e en tant que membre du bureau
|
||||
*/
|
||||
|
||||
public class AjoutMembreBureau extends AjoutPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public AjoutMembreBureau(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 0;
|
||||
}
|
||||
}
|
115
src/vue/AjoutPersonne.java
Normal file
115
src/vue/AjoutPersonne.java
Normal file
@ -0,0 +1,115 @@
|
||||
package vue;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import vue.MembreBureau.amembreListener;
|
||||
|
||||
/*
|
||||
* Classe permettant de creer une personne dans le club en definissant nom, prenom, adresse, date de naissance,
|
||||
* numero de telephone, date d'adhesion, et mot de passe
|
||||
*/
|
||||
|
||||
public class AjoutPersonne extends JDialog
|
||||
{
|
||||
JLabel Nom;
|
||||
JLabel Prenom;
|
||||
JLabel Adresse;
|
||||
JLabel dtn;
|
||||
JLabel num;
|
||||
JLabel addhesions;
|
||||
JLabel pwd;
|
||||
JPanel bas;
|
||||
JPanel gauche;
|
||||
JPanel droite;
|
||||
JButton valid;
|
||||
JButton annul;
|
||||
GridLayout text;
|
||||
GridLayout entrance;
|
||||
JTextField t_nom;
|
||||
JTextField t_prenom;
|
||||
JTextField t_adresse;
|
||||
JTextField t_dtn;
|
||||
JTextField t_num;
|
||||
JTextField t_addhesion;
|
||||
JTextField t_pwd;
|
||||
|
||||
public AjoutPersonne(String title, int larg, int haut)
|
||||
{
|
||||
setTitle(title);
|
||||
setModal(true);
|
||||
this.setSize(larg, haut);
|
||||
this.setResizable(false);
|
||||
this.setLocationRelativeTo(null);
|
||||
text = new GridLayout(7, 1);
|
||||
entrance = new GridLayout(7, 1);
|
||||
gauche = new JPanel();
|
||||
droite = new JPanel();
|
||||
bas = new JPanel();
|
||||
droite.setLayout(text);
|
||||
gauche.setLayout(entrance);
|
||||
Nom = new JLabel("Nom : ");
|
||||
Prenom = new JLabel("Prenom : ");
|
||||
Adresse = new JLabel("Adresse : ");
|
||||
dtn = new JLabel("Date de naissance : ");
|
||||
num = new JLabel("Nunmero de telephone : ");
|
||||
addhesions = new JLabel("Date d'adhesion : ");
|
||||
pwd = new JLabel("Mot de passe : ");
|
||||
t_nom = new JTextField(30);
|
||||
t_prenom = new JTextField(30);
|
||||
t_adresse = new JTextField(30);
|
||||
t_dtn = new JTextField(30);
|
||||
t_num = new JTextField(30);
|
||||
t_addhesion = new JTextField(30);
|
||||
t_pwd = new JTextField(30);
|
||||
valid = new JButton("Valider");
|
||||
annul = new JButton("Annuler");
|
||||
gauche.add(Nom);
|
||||
gauche.add(Prenom);
|
||||
gauche.add(Adresse);
|
||||
gauche.add(dtn);
|
||||
gauche.add(num);
|
||||
gauche.add(addhesions);
|
||||
gauche.add(pwd);
|
||||
droite.add(t_nom);
|
||||
droite.add(t_prenom);
|
||||
droite.add(t_adresse);
|
||||
droite.add(t_dtn);
|
||||
droite.add(t_num);
|
||||
droite.add(t_addhesion);
|
||||
droite.add(t_pwd);
|
||||
bas.add(annul, BorderLayout.WEST);
|
||||
bas.add(valid, BorderLayout.EAST);
|
||||
this.add(bas, BorderLayout.SOUTH);
|
||||
this.add(gauche, BorderLayout.WEST);
|
||||
this.add(droite, BorderLayout.EAST);
|
||||
valid.addActionListener(new validListener());
|
||||
annul.addActionListener(new annulListener());
|
||||
}
|
||||
|
||||
class validListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
//envoie dans la base de donn<EFBFBD>es
|
||||
// et ferme la fenetre
|
||||
}
|
||||
}
|
||||
|
||||
class annulListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
//ferme la fenetre sans envoyer
|
||||
}
|
||||
}
|
||||
}
|
155
src/vue/MembreBureau.java
Normal file
155
src/vue/MembreBureau.java
Normal file
@ -0,0 +1,155 @@
|
||||
package vue;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Container;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/*
|
||||
* Fenetre principale d'un membre du bureau permettant de choisir au choix de creer ou
|
||||
* supprimer quelqu'un de la base de donn<EFBFBD>es
|
||||
*/
|
||||
|
||||
public class MembreBureau extends JDialog
|
||||
{
|
||||
JButton amembre;
|
||||
JButton smembre;
|
||||
JButton adesk;
|
||||
JButton sdesk;
|
||||
JButton aentraineur;
|
||||
JButton sentraineur;
|
||||
JPanel ajout;
|
||||
JPanel supression;
|
||||
GridLayout grille;
|
||||
GridLayout grille2;
|
||||
|
||||
/*
|
||||
* Creation de la fenetre principal et des boutons
|
||||
* Par bloc :
|
||||
* + creation :
|
||||
* - de la fenetre
|
||||
* - des Grilles pour les boutons
|
||||
* - des boutons
|
||||
* - de panel pour placer les boutons
|
||||
* + ajout :
|
||||
* - des grilles sur le panel
|
||||
* - des panels dans la fenetre
|
||||
* - des boutons dans les panels
|
||||
* + abonnements sur les boutons
|
||||
*/
|
||||
|
||||
public MembreBureau(String title, int larg, int haut)
|
||||
{
|
||||
setTitle(title);
|
||||
setModal(true);
|
||||
this.setSize(larg, haut);
|
||||
this.setLocationRelativeTo(null);
|
||||
this.setResizable(false);
|
||||
grille = new GridLayout(3, 1);
|
||||
grille2 = new GridLayout(3, 1);
|
||||
amembre = new JButton("Ajout d'un membre");
|
||||
smembre = new JButton("Suppression d'un membre");
|
||||
aentraineur = new JButton("Ajout d'un entraineur");
|
||||
sentraineur = new JButton("Suppression d'un entraineur");
|
||||
adesk = new JButton("Ajout d'un membre du bureau");
|
||||
sdesk = new JButton("Suppression d'un membre du bureau");
|
||||
ajout = new JPanel();
|
||||
supression = new JPanel();
|
||||
ajout.setLayout(grille);
|
||||
supression.setLayout(grille2);
|
||||
this.add(ajout, BorderLayout.EAST);
|
||||
this.add(supression, BorderLayout.WEST);
|
||||
ajout.add(amembre, BorderLayout.NORTH);
|
||||
supression.add(smembre, BorderLayout.NORTH);
|
||||
ajout.add(aentraineur, BorderLayout.CENTER);
|
||||
supression.add(sentraineur, BorderLayout.CENTER);
|
||||
ajout.add(adesk, BorderLayout.SOUTH);
|
||||
supression.add(sdesk, BorderLayout.SOUTH);
|
||||
amembre.addActionListener(new amembreListener());
|
||||
aentraineur.addActionListener(new aentraineurListener());
|
||||
adesk.addActionListener(new adeskListener());
|
||||
smembre.addActionListener(new smembreListener());
|
||||
sentraineur.addActionListener(new sentraineurListener());
|
||||
sdesk.addActionListener(new sdeskListener());
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonction d'ecoute des boutons, chacun lance une fenetre associee
|
||||
*/
|
||||
|
||||
class amembreListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
AjoutMembre test = new AjoutMembre("Ajout d'un membre", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
class aentraineurListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
AjoutEntraineur test = new AjoutEntraineur("Ajout d'un entraineur", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
class adeskListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
AjoutMembreBureau test = new AjoutMembreBureau("Ajout d'un membre du bureau", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
class smembreListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
SupprimerMembre test = new SupprimerMembre("Suppression d'un membre", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
class sentraineurListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
SupprimerEntraineur test = new SupprimerEntraineur("Suppression d'un entraineur", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
class sdeskListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
SupprimerDesk test = new SupprimerDesk("Suppression d'un membre du bureau", 600, 300);
|
||||
test.setVisible(true);
|
||||
test.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] argv)
|
||||
{
|
||||
MembreBureau essai;
|
||||
AjoutMembre test;
|
||||
essai = new MembreBureau("Membre du Bureau", 450, 150);
|
||||
essai.setVisible(true);
|
||||
essai.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
|
||||
}
|
||||
}
|
16
src/vue/SupprimerDesk.java
Normal file
16
src/vue/SupprimerDesk.java
Normal file
@ -0,0 +1,16 @@
|
||||
package vue;
|
||||
|
||||
/*
|
||||
* Classe permettant de supprimant une personne etant membre du bureau
|
||||
*/
|
||||
|
||||
public class SupprimerDesk extends SupprimerPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public SupprimerDesk(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 0;
|
||||
}
|
||||
}
|
16
src/vue/SupprimerEntraineur.java
Normal file
16
src/vue/SupprimerEntraineur.java
Normal file
@ -0,0 +1,16 @@
|
||||
package vue;
|
||||
|
||||
/*
|
||||
* Classe permettant de supprimant une personne dans le club etant un entraineur
|
||||
*/
|
||||
|
||||
public class SupprimerEntraineur extends SupprimerPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public SupprimerEntraineur(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 1;
|
||||
}
|
||||
}
|
16
src/vue/SupprimerMembre.java
Normal file
16
src/vue/SupprimerMembre.java
Normal file
@ -0,0 +1,16 @@
|
||||
package vue;
|
||||
|
||||
/*
|
||||
* Classe permettant de supprimant une personne dans le club etant un simple membre
|
||||
*/
|
||||
|
||||
public class SupprimerMembre extends SupprimerPersonne
|
||||
{
|
||||
int droit;
|
||||
|
||||
public SupprimerMembre(String title, int larg, int haut)
|
||||
{
|
||||
super(title, larg, haut);
|
||||
droit = 2;
|
||||
}
|
||||
}
|
60
src/vue/SupprimerPersonne.java
Normal file
60
src/vue/SupprimerPersonne.java
Normal file
@ -0,0 +1,60 @@
|
||||
package vue;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import vue.AjoutPersonne.validListener;
|
||||
|
||||
/*
|
||||
* Classe permettant de supprimant une personne dans le club
|
||||
*
|
||||
* Doit afficher la liste des inscrits dans la base de donnees suivant les droits appeles par les methodes filles
|
||||
*/
|
||||
|
||||
public class SupprimerPersonne extends JDialog
|
||||
{
|
||||
JPanel bas;
|
||||
JButton valid;
|
||||
JButton annul;
|
||||
|
||||
public SupprimerPersonne(String title, int larg, int haut)
|
||||
{
|
||||
setTitle(title);
|
||||
setModal(true);
|
||||
this.setSize(larg, haut);
|
||||
this.setResizable(false);
|
||||
this.setLocationRelativeTo(null);
|
||||
valid = new JButton("Valider");
|
||||
annul = new JButton("Annuler");
|
||||
bas = new JPanel();
|
||||
this.add(bas, BorderLayout.SOUTH);
|
||||
bas.add(annul, BorderLayout.WEST);
|
||||
bas.add(valid, BorderLayout.EAST);
|
||||
valid.addActionListener(new validListener());
|
||||
annul.addActionListener(new annulListener());
|
||||
}
|
||||
|
||||
class validListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
//supprime de la base de donn<EFBFBD>es
|
||||
}
|
||||
}
|
||||
|
||||
class annulListener implements ActionListener
|
||||
{
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
//ferme la fenetre sans envoyer
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user