-
Notifications
You must be signed in to change notification settings - Fork 0
/
FramePass.java
55 lines (40 loc) · 1.37 KB
/
FramePass.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
// import java.awt.BorderLayout; (par défaut)
import java.awt.BorderLayout;
import javax.swing.*;
public class FramePass extends JFrame
{
Controleur ctrl;
PanelHeader panelHeader;
PanelDrawer panelDrawer;
PanelMain panelMain ;
public FramePass( Controleur ctrl )
{
this.ctrl = ctrl;
this.setTitle ( "ToPass" );
this.setLocation(180, 180);
this.setSize(600, 600);
/*----------------------------*/
/* Création des panels */
/*----------------------------*/
this.panelHeader = new PanelHeader (ctrl);
this.panelDrawer = new PanelDrawer (ctrl);
this.panelMain = new PanelMain (ctrl);
/*--------------------------------*/
/* positionnement des panels */
/*--------------------------------*/
this.add( this.panelHeader, BorderLayout.NORTH );
this.add( this.panelDrawer, BorderLayout.WEST );
this.add( this.panelMain );
this.pack();
this.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
this.setVisible( true );
}
public void maj()
{
this.panelHeader.setName(this.ctrl.getName());
this.panelMain.setLink (this.ctrl.getLink());
this.panelMain.setId (this.ctrl.getId());
this.panelMain.setMdp (this.ctrl.getMdp());
this.panelMain.setNote (this.ctrl.getNote());
}
}