$
This commit is contained in:
@@ -18,7 +18,6 @@ public class StudentView extends JPanel {
|
||||
private final ArrayList<Groupe> g;
|
||||
private final Controller listener;
|
||||
private JComboBox<String> groupeOption;
|
||||
private JTextField text;
|
||||
|
||||
public StudentView(ArrayList<Etudiant> e, ArrayList<Groupe> g, Controller listener) {
|
||||
super();
|
||||
@@ -36,10 +35,6 @@ public class StudentView extends JPanel {
|
||||
return (String) this.groupeOption.getSelectedItem();
|
||||
}
|
||||
|
||||
public String getSearchStud() {
|
||||
return this.text.getText();
|
||||
}
|
||||
|
||||
public int getComboSelectionIndex() {
|
||||
return this.groupeOption.getSelectedIndex();
|
||||
}
|
||||
@@ -47,11 +42,11 @@ public class StudentView extends JPanel {
|
||||
public void Display() {
|
||||
BLayout settings = new BLayout();
|
||||
settings.setPositionX(0);
|
||||
settings.setPositionY(6);
|
||||
settings.setPositionY(1);
|
||||
|
||||
settings.setPositionY(0);
|
||||
JButton studList = new JButton("Voir la liste des etudiants");
|
||||
studList.setActionCommand("pv::GetStudList");
|
||||
JButton studList = new JButton("Voir la liste des groupes");
|
||||
studList.setActionCommand("sv::GetGrup");
|
||||
studList.addActionListener(this.listener);
|
||||
this.add(studList, settings);
|
||||
|
||||
@@ -78,47 +73,28 @@ public class StudentView extends JPanel {
|
||||
settings.setPadding(new Insets(0, 0, 0, 0));
|
||||
settings.setAnchor(GridBagConstraints.EAST);
|
||||
JButton confirm = new JButton("Rechercher");
|
||||
confirm.setActionCommand("pv::GetListFiltered");
|
||||
confirm.setActionCommand("sv::GetListFiltered");
|
||||
confirm.addActionListener(this.listener);
|
||||
this.add(confirm, settings);
|
||||
|
||||
settings.setAnchor(GridBagConstraints.CENTER);
|
||||
|
||||
settings.setPositionY(4);
|
||||
settings.setAnchor(GridBagConstraints.CENTER);
|
||||
this.add(new JLabel(" "), settings);
|
||||
|
||||
settings.setPositionY(5);
|
||||
JLabel pf = new JLabel("Rechercher un etudiant : ");
|
||||
this.add(pf, settings);
|
||||
JButton makeRequest = new JButton("Faire une requete");
|
||||
makeRequest.setActionCommand("sv::MakeRequest");
|
||||
makeRequest.addActionListener(this.listener);
|
||||
this.add(makeRequest, settings);
|
||||
|
||||
settings.setPositionY(6);
|
||||
settings.setPadding(new Insets(0, 0, 0, 50));
|
||||
this.text = new JTextField();
|
||||
this.text.setPreferredSize(new Dimension(110, 30));
|
||||
text.addKeyListener(new KeyAdapter() {
|
||||
public void keyTyped(KeyEvent e) {
|
||||
if (text.getText().length() >= 3 )
|
||||
e.consume();
|
||||
}
|
||||
});
|
||||
this.add(this.text, settings);
|
||||
|
||||
settings.setPositionY(6);
|
||||
settings.setPadding(new Insets(0, 0, 0, 0));
|
||||
settings.setAnchor(GridBagConstraints.EAST);
|
||||
JButton searchTLetters = new JButton("Rechercher");
|
||||
searchTLetters.addActionListener(this.listener);
|
||||
searchTLetters.setActionCommand("pv::SearchStudentPer3Letters");
|
||||
this.add(searchTLetters, settings);
|
||||
settings.setAnchor(GridBagConstraints.CENTER);
|
||||
|
||||
settings.setPositionY(7);
|
||||
this.add(new JLabel(" "), settings);
|
||||
|
||||
settings.setPositionY(8);
|
||||
JButton changGrp = new JButton("Changer de groupe");
|
||||
changGrp.addActionListener(this.listener);
|
||||
this.add(changGrp, settings);
|
||||
settings.setPositionY(7);
|
||||
JButton showRequest = new JButton("Voir mes requetes");
|
||||
showRequest.setActionCommand("sv::ShowRequest");
|
||||
showRequest.addActionListener(this.listener);
|
||||
this.add(showRequest, settings);
|
||||
|
||||
this.repaint();
|
||||
}
|
||||
|
Reference in New Issue
Block a user