Ajout chargement pour faire styler
This commit is contained in:
@@ -13,20 +13,25 @@ import fr.iutfbleau.projetIHM2022FI2.Graphic.Controller.ObservateurChangeGroupe;
|
||||
public class FenetreGroupe extends JPanel{
|
||||
private Groupe g;
|
||||
public FenetreGroupe(Groupe g, Model m){
|
||||
super(new GridLayout(15, 1));
|
||||
super();
|
||||
this.g=g;
|
||||
JButton bout=new JButton("point point");
|
||||
bout.addActionListener(new ObservateurChangeGroupe(m, this.g.getPointPoint()));
|
||||
this.add(bout);
|
||||
this.add(new JLabel(g.getName()));
|
||||
this.add(new JLabel("id= "+String.valueOf(g.getId())));
|
||||
this.add(new JLabel("min= "+String.valueOf(g.getMin())));
|
||||
this.add(new JLabel("max= "+String.valueOf(g.getMax())));
|
||||
this.add(new JLabel("Sous groupe"));
|
||||
for(Groupe gr: g.getSousGroupes()){
|
||||
JButton b=new JButton(gr.getName());
|
||||
b.addActionListener(new ObservateurChangeGroupe(m, gr));
|
||||
this.add(b);
|
||||
if(g!=null){
|
||||
this.setLayout(new GridLayout(15, 1));
|
||||
JButton bout=new JButton("point point");
|
||||
bout.addActionListener(new ObservateurChangeGroupe(m, this.g.getPointPoint()));
|
||||
this.add(bout);
|
||||
this.add(new JLabel(g.getName()));
|
||||
this.add(new JLabel("id= "+String.valueOf(g.getId())));
|
||||
this.add(new JLabel("min= "+String.valueOf(g.getMin())));
|
||||
this.add(new JLabel("max= "+String.valueOf(g.getMax())));
|
||||
this.add(new JLabel("Sous groupe"));
|
||||
for(Groupe gr: g.getSousGroupes()){
|
||||
JButton b=new JButton(gr.getName());
|
||||
b.addActionListener(new ObservateurChangeGroupe(m, gr));
|
||||
this.add(b);
|
||||
}
|
||||
}else{
|
||||
this.add(new JLabel("Il n'y a pas encore de Groupe"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user