-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFenetrePrincipale.java
73 lines (47 loc) · 2.07 KB
/
FenetrePrincipale.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package vue;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.WindowConstants;
import vue.interfaces.IFenetrePrincipale;
import controleur.CtrlPrincipal;
public class FenetrePrincipale extends JFrame implements IFenetrePrincipale {
private static final long serialVersionUID = 1L;
private CtrlPrincipal monControleur;
public static JTabbedPane ongletsDeNavigation;
private JLabel titreApplication;
private Font policePersonnaliseeTitreApplication;
public static JFrame jFrame;
private static JPanel panneauTitreApplication;
public FenetrePrincipale(CtrlPrincipal controleur) {
super("Ma fenetre principale");
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
monControleur = controleur;
jFrame = new JFrame();
jFrame.getContentPane().setLayout(new GridLayout(2,1));
panneauTitreApplication = new JPanel(new FlowLayout());
titreApplication = new JLabel("Générateur de fiche de paye", JLabel.CENTER);
policePersonnaliseeTitreApplication = new Font("Arial", Font.BOLD,20);
titreApplication.setFont(policePersonnaliseeTitreApplication);
add(panneauTitreApplication, BorderLayout.NORTH);
panneauTitreApplication.add(titreApplication);
AjoutOnglets();
setSize(1000,600);
setVisible(true);
}
private void AjoutOnglets() {
ongletsDeNavigation = new JTabbedPane();
PanneauRegles panneauSaisieRegle = new PanneauRegles(this.monControleur.getControleurRegles());
PanneauSalaire panneauSalaire = new PanneauSalaire(this.monControleur.getControleurSalaire());
PanneauCotisations panneauListeCotisations = new PanneauCotisations(this.monControleur.getControleurListeCotisations());
ongletsDeNavigation.add("Saisie d'un salaire", panneauSalaire);
ongletsDeNavigation.add("Gestion des règles", panneauSaisieRegle);
ongletsDeNavigation.add("Gestion des cotisations", panneauListeCotisations);
add(ongletsDeNavigation);
}
}