-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Iuzziel/prototype
Prototype
- Loading branch information
Showing
6 changed files
with
82 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="U:/dl101/Exercices/Eclipse/Workspace/JAR/ojdbc6.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package fenetres; | ||
|
||
import javax.swing.JFrame; | ||
import javax.swing.JPanel; | ||
import java.awt.BorderLayout; | ||
import java.awt.Dimension; | ||
|
||
public final class FenetrePrincipale extends JFrame { | ||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = -629171735000729382L; | ||
|
||
//Donnees membres | ||
public static PartieVisiteur partieVisiteur; | ||
public static PartieEmploye partieEmploye; | ||
public static JPanel contentPane; | ||
|
||
// Constructeur de la fenetre | ||
public FenetrePrincipale() { | ||
contentPane = (JPanel) this.getContentPane(); | ||
contentPane.setMinimumSize(new Dimension(800, 600)); | ||
contentPane.setLayout(new BorderLayout(5, 5)); | ||
contentPane.setVisible(true); | ||
|
||
//Par defaut l'application s'ouvrre sur la partie visiteur | ||
partieVisiteur = new PartieVisiteur(); | ||
|
||
contentPane.add(partieVisiteur, BorderLayout.CENTER); | ||
System.out.println("Constructeur atteint : Fenetre client"); | ||
} | ||
|
||
//Accesseurs | ||
public static PartieVisiteur getPartieVisiteur() { | ||
return partieVisiteur; | ||
} | ||
|
||
public static void setPartieVisiteur(PartieVisiteur partieVisiteur) { | ||
FenetrePrincipale.partieVisiteur = partieVisiteur; | ||
} | ||
|
||
public static PartieEmploye getPartieEmploye() { | ||
return partieEmploye; | ||
} | ||
|
||
public static void setPartieEmploye(PartieEmploye partieEmploye) { | ||
FenetrePrincipale.partieEmploye = partieEmploye; | ||
} | ||
|
||
public static void changerPartieClient() { | ||
if(FenetreConnexion.isEstConnecte()) { | ||
FenetrePrincipale.contentPane.remove(FenetrePrincipale.partieVisiteur); | ||
FenetrePrincipale.setPartieEmploye(new PartieEmploye()); | ||
FenetrePrincipale.contentPane.add(FenetrePrincipale.partieEmploye); | ||
FenetrePrincipale.contentPane.validate(); | ||
FenetrePrincipale.contentPane.repaint(); | ||
}else{ | ||
FenetrePrincipale.contentPane.remove(FenetrePrincipale.partieEmploye); | ||
FenetrePrincipale.contentPane.add(FenetrePrincipale.partieVisiteur); | ||
FenetrePrincipale.contentPane.validate(); | ||
FenetrePrincipale.contentPane.repaint(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters