Line 9... |
Line 9... |
9 |
import org.tela_botanica.client.i18n.Constantes;
|
9 |
import org.tela_botanica.client.i18n.Constantes;
|
10 |
import org.tela_botanica.client.images.Images;
|
10 |
import org.tela_botanica.client.images.Images;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
12 |
import org.tela_botanica.client.modeles.Information;
|
12 |
import org.tela_botanica.client.modeles.Information;
|
13 |
import org.tela_botanica.client.modeles.Utilisateur;
|
13 |
import org.tela_botanica.client.modeles.Utilisateur;
|
- |
|
14 |
import org.tela_botanica.client.modeles.personne.Personne;
|
- |
|
15 |
import org.tela_botanica.client.modeles.publication.Publication;
|
14 |
import org.tela_botanica.client.modeles.structure.Structure;
|
16 |
import org.tela_botanica.client.modeles.structure.Structure;
|
15 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
17 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
16 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
18 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
Line 17... |
Line 19... |
17 |
|
19 |
|
Line 48... |
Line 50... |
48 |
private Button modifier;
|
50 |
private Button modifier;
|
49 |
private Button supprimer;
|
51 |
private Button supprimer;
|
50 |
private Button ajouter;
|
52 |
private Button ajouter;
|
Line 51... |
Line 53... |
51 |
|
53 |
|
- |
|
54 |
private BarrePaginationVue pagination = null;
|
- |
|
55 |
|
- |
|
56 |
private int indexElementSelectionne = 0;
|
Line 52... |
Line 57... |
52 |
private BarrePaginationVue pagination = null;
|
57 |
private Structure structureSelectionnee = null;
|
53 |
|
58 |
|
54 |
public StructureListeVue(Mediateur mediateurCourant) {
|
59 |
public StructureListeVue(Mediateur mediateurCourant) {
|
Line 94... |
Line 99... |
94 |
ColumnModel modeleDeColonne = new ColumnModel(colonnes);
|
99 |
ColumnModel modeleDeColonne = new ColumnModel(colonnes);
|
Line 95... |
Line 100... |
95 |
|
100 |
|
96 |
GridSelectionModel<Structure> modeleDeSelection = new GridSelectionModel<Structure>();
|
101 |
GridSelectionModel<Structure> modeleDeSelection = new GridSelectionModel<Structure>();
|
97 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
|
102 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Structure>() {
|
98 |
public void selectionChanged(SelectionChangedEvent<Structure> event) {
|
103 |
public void selectionChanged(SelectionChangedEvent<Structure> event) {
|
- |
|
104 |
structureSelectionnee = (Structure) event.getSelectedItem();
|
99 |
Structure structureSelectionnee = (Structure) event.getSelectedItem();
|
105 |
indexElementSelectionne = store.indexOf(structureSelectionnee);
|
100 |
clicListe(structureSelectionnee);
|
106 |
clicListe(structureSelectionnee);
|
101 |
}
|
107 |
}
|
Line 102... |
Line 108... |
102 |
});
|
108 |
});
|
Line 183... |
Line 189... |
183 |
for (int i = 0; i < taille; i++) {
|
189 |
for (int i = 0; i < taille; i++) {
|
184 |
store.remove(selectionStructure.get(i));
|
190 |
store.remove(selectionStructure.get(i));
|
185 |
}
|
191 |
}
|
Line 186... |
Line 192... |
186 |
|
192 |
|
- |
|
193 |
gererEtatActivationBouton();
|
- |
|
194 |
} else if(info.getType().equals("structure_modifiee")) {
|
- |
|
195 |
if(structureSelectionnee != null) {
|
- |
|
196 |
store.remove(indexElementSelectionne);
|
- |
|
197 |
structureSelectionnee = null;
|
- |
|
198 |
}
|
- |
|
199 |
Structure structureModifiee = (Structure)info.getDonnee(0);
|
- |
|
200 |
// au cas ou le bouton appliquer aurait été cliqué avant de valider
|
- |
|
201 |
store.remove(structureModifiee);
|
- |
|
202 |
store.insert(structureModifiee, indexElementSelectionne);
|
- |
|
203 |
grille.repaint();
|
- |
|
204 |
grille.getSelectionModel().select(indexElementSelectionne, true);
|
187 |
gererEtatActivationBouton();
|
205 |
clicListe(structureModifiee);
|
188 |
} else if (info.getType().equals("maj_utilisateur")) {
|
206 |
} else if (info.getType().equals("maj_utilisateur")) {
|
189 |
gererEtatActivationBouton();
|
207 |
gererEtatActivationBouton();
|
190 |
} else if (info.getType().equals("suppression_structure_a_personne")) {
|
208 |
} else if (info.getType().equals("suppression_structure_a_personne")) {
|
191 |
// Affichage d'un message d'information
|
209 |
// Affichage d'un message d'information
|