1 |
package org.tela_botanica.client.vues.collection;
|
1 |
package org.tela_botanica.client.vues.collection;
|
2 |
|
2 |
|
3 |
import java.util.ArrayList;
|
3 |
import java.util.ArrayList;
|
4 |
import java.util.Iterator;
|
4 |
import java.util.Iterator;
|
5 |
import java.util.List;
|
5 |
import java.util.List;
|
6 |
|
6 |
|
7 |
import org.tela_botanica.client.Mediateur;
|
7 |
import org.tela_botanica.client.Mediateur;
|
8 |
import org.tela_botanica.client.RegistreId;
|
8 |
import org.tela_botanica.client.RegistreId;
|
9 |
import org.tela_botanica.client.composants.ChampFiltreRecherche;
|
9 |
import org.tela_botanica.client.composants.ChampFiltreRecherche;
|
10 |
import org.tela_botanica.client.composants.InfoLogger;
|
10 |
import org.tela_botanica.client.composants.InfoLogger;
|
11 |
import org.tela_botanica.client.i18n.Constantes;
|
11 |
import org.tela_botanica.client.i18n.Constantes;
|
12 |
import org.tela_botanica.client.images.Images;
|
12 |
import org.tela_botanica.client.images.Images;
|
13 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
13 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
14 |
import org.tela_botanica.client.modeles.Information;
|
14 |
import org.tela_botanica.client.modeles.Information;
|
15 |
import org.tela_botanica.client.modeles.Utilisateur;
|
15 |
import org.tela_botanica.client.modeles.Utilisateur;
|
16 |
import org.tela_botanica.client.modeles.collection.Collection;
|
16 |
import org.tela_botanica.client.modeles.collection.Collection;
|
17 |
import org.tela_botanica.client.modeles.collection.CollectionAsyncDao;
|
17 |
import org.tela_botanica.client.modeles.collection.CollectionAsyncDao;
|
18 |
import org.tela_botanica.client.modeles.collection.CollectionListe;
|
18 |
import org.tela_botanica.client.modeles.collection.CollectionListe;
|
19 |
import org.tela_botanica.client.modeles.personne.Personne;
|
19 |
import org.tela_botanica.client.modeles.personne.Personne;
|
20 |
import org.tela_botanica.client.modeles.personne.PersonneAsyncDao;
|
20 |
import org.tela_botanica.client.modeles.personne.PersonneAsyncDao;
|
21 |
import org.tela_botanica.client.modeles.publication.Publication;
|
21 |
import org.tela_botanica.client.modeles.publication.Publication;
|
22 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
22 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
23 |
import org.tela_botanica.client.util.Debug;
|
23 |
import org.tela_botanica.client.util.Debug;
|
24 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
24 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
25 |
|
25 |
|
26 |
import com.extjs.gxt.ui.client.Registry;
|
26 |
import com.extjs.gxt.ui.client.Registry;
|
27 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
27 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
28 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
28 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
29 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
29 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
30 |
import com.extjs.gxt.ui.client.event.Events;
|
30 |
import com.extjs.gxt.ui.client.event.Events;
|
31 |
import com.extjs.gxt.ui.client.event.GridEvent;
|
31 |
import com.extjs.gxt.ui.client.event.GridEvent;
|
32 |
import com.extjs.gxt.ui.client.event.Listener;
|
32 |
import com.extjs.gxt.ui.client.event.Listener;
|
33 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
33 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
34 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
34 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
35 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
35 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
36 |
import com.extjs.gxt.ui.client.store.ListStore;
|
36 |
import com.extjs.gxt.ui.client.store.ListStore;
|
37 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
37 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
38 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
38 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
39 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
39 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
40 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
40 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
41 |
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
41 |
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
42 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
42 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
43 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
43 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
44 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
44 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
45 |
|
45 |
|
46 |
public class CollectionListeVue extends ContentPanel implements Rafraichissable {
|
46 |
public class CollectionListeVue extends ContentPanel implements Rafraichissable {
|
47 |
|
47 |
|
48 |
private Mediateur mediateur = null;
|
48 |
private Mediateur mediateur = null;
|
49 |
private Constantes i18nC = null;
|
49 |
private Constantes i18nC = null;
|
50 |
|
50 |
|
51 |
private Grid<Collection> grille = null;
|
51 |
private Grid<Collection> grille = null;
|
52 |
private ListStore<Collection> store = null;
|
52 |
private ListStore<Collection> store = null;
|
53 |
|
53 |
|
54 |
private Button modifier;
|
54 |
private Button modifier;
|
55 |
private Button supprimer;
|
55 |
private Button supprimer;
|
56 |
private Button ajouter;
|
56 |
private Button ajouter;
|
57 |
private BarrePaginationVue pagination = null;
|
57 |
private BarrePaginationVue pagination = null;
|
58 |
private ChampFiltreRecherche champFiltreRecherche = null;
|
58 |
private ChampFiltreRecherche champFiltreRecherche = null;
|
59 |
|
59 |
|
60 |
private int indexElementSelectionne = 0;
|
60 |
private int indexElementSelectionne = 0;
|
61 |
private Collection collectionSelectionnee = null;
|
61 |
private Collection collectionSelectionnee = null;
|
62 |
|
62 |
|
63 |
public CollectionListeVue(Mediateur mediateurCourant) {
|
63 |
public CollectionListeVue(Mediateur mediateurCourant) {
|
64 |
mediateur = mediateurCourant;
|
64 |
mediateur = mediateurCourant;
|
65 |
i18nC = Mediateur.i18nC;
|
65 |
i18nC = Mediateur.i18nC;
|
66 |
|
66 |
|
67 |
setLayout(new FitLayout());
|
67 |
setLayout(new FitLayout());
|
68 |
setHeadingHtml(i18nC.collectionListeTitre());
|
68 |
setHeaderVisible(false);
|
69 |
|
69 |
|
70 |
ToolBar toolBar = new ToolBar();
|
70 |
ToolBar toolBar = new ToolBar();
|
71 |
ajouter = new Button(i18nC.ajouter());
|
71 |
ajouter = new Button(i18nC.ajouter());
|
72 |
ajouter.setIcon(Images.ICONES.ajouter());
|
72 |
ajouter.setIcon(Images.ICONES.ajouter());
|
73 |
ajouter.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
73 |
ajouter.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
74 |
public void componentSelected(ButtonEvent ce) {
|
74 |
public void componentSelected(ButtonEvent ce) {
|
75 |
mediateur.clicAjouterCollection();
|
75 |
mediateur.clicAjouterCollection();
|
76 |
}
|
76 |
}
|
77 |
});
|
77 |
});
|
78 |
ajouter.setToolTip(i18nC.indicationCreerUneFiche()+" "+i18nC.collectionSingulier());
|
78 |
ajouter.setToolTip(i18nC.indicationCreerUneFiche()+" "+i18nC.collectionSingulier());
|
79 |
toolBar.add(ajouter);
|
79 |
toolBar.add(ajouter);
|
80 |
|
80 |
|
81 |
modifier = new Button(i18nC.modifier());
|
81 |
modifier = new Button(i18nC.modifier());
|
82 |
modifier.setIcon(Images.ICONES.formModifier());
|
82 |
modifier.setIcon(Images.ICONES.formModifier());
|
83 |
modifier.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
83 |
modifier.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
84 |
public void componentSelected(ButtonEvent ce) {
|
84 |
public void componentSelected(ButtonEvent ce) {
|
85 |
mediateur.clicModifierCollection(grille.getSelectionModel().getSelectedItems());
|
85 |
mediateur.clicModifierCollection(grille.getSelectionModel().getSelectedItems());
|
86 |
}
|
86 |
}
|
87 |
});
|
87 |
});
|
88 |
modifier.setToolTip(i18nC.indicationModifierUneFiche());
|
88 |
modifier.setToolTip(i18nC.indicationModifierUneFiche());
|
89 |
toolBar.add(modifier);
|
89 |
toolBar.add(modifier);
|
90 |
|
90 |
|
91 |
supprimer = new Button(i18nC.supprimer());
|
91 |
supprimer = new Button(i18nC.supprimer());
|
92 |
supprimer.setIcon(Images.ICONES.supprimer());
|
92 |
supprimer.setIcon(Images.ICONES.supprimer());
|
93 |
supprimer.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
93 |
supprimer.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
94 |
public void componentSelected(ButtonEvent ce) {
|
94 |
public void componentSelected(ButtonEvent ce) {
|
95 |
clicSupprimerCollection(grille.getSelectionModel().getSelectedItems());
|
95 |
clicSupprimerCollection(grille.getSelectionModel().getSelectedItems());
|
96 |
}
|
96 |
}
|
97 |
});
|
97 |
});
|
98 |
supprimer.setToolTip(i18nC.indicationSupprimerUneFiche());
|
98 |
supprimer.setToolTip(i18nC.indicationSupprimerUneFiche());
|
99 |
toolBar.add(supprimer);
|
99 |
toolBar.add(supprimer);
|
100 |
|
100 |
|
101 |
setTopComponent(toolBar);
|
101 |
setTopComponent(toolBar);
|
102 |
|
102 |
|
103 |
List<ColumnConfig> colonnes = new ArrayList<ColumnConfig>();
|
103 |
List<ColumnConfig> colonnes = new ArrayList<ColumnConfig>();
|
104 |
colonnes.add(new ColumnConfig("nom", i18nC.personneNom(), 300));
|
104 |
colonnes.add(new ColumnConfig("nom", i18nC.personneNom(), 300));
|
105 |
colonnes.add(new ColumnConfig("_structure_nom_", i18nC.structure(), 200));
|
105 |
colonnes.add(new ColumnConfig("_structure_nom_", i18nC.structure(), 200));
|
106 |
colonnes.add(new ColumnConfig("_structure_ville_", i18nC.ville(), 150));
|
106 |
colonnes.add(new ColumnConfig("_structure_ville_", i18nC.ville(), 150));
|
107 |
colonnes.get(1).setHidden(true);
|
107 |
colonnes.get(1).setHidden(true);
|
108 |
ColumnModel modeleDeColonne = new ColumnModel(colonnes);
|
108 |
ColumnModel modeleDeColonne = new ColumnModel(colonnes);
|
109 |
|
109 |
|
110 |
GridSelectionModel<Collection> modeleDeSelection = new GridSelectionModel<Collection>();
|
110 |
GridSelectionModel<Collection> modeleDeSelection = new GridSelectionModel<Collection>();
|
111 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Collection>() {
|
111 |
modeleDeSelection.addSelectionChangedListener(new SelectionChangedListener<Collection>() {
|
112 |
public void selectionChanged(SelectionChangedEvent<Collection> event) {
|
112 |
public void selectionChanged(SelectionChangedEvent<Collection> event) {
|
113 |
collectionSelectionnee = (Collection) event.getSelectedItem();
|
113 |
collectionSelectionnee = (Collection) event.getSelectedItem();
|
114 |
indexElementSelectionne = store.indexOf(collectionSelectionnee);
|
114 |
indexElementSelectionne = store.indexOf(collectionSelectionnee);
|
115 |
clicListe(collectionSelectionnee);
|
115 |
clicListe(collectionSelectionnee);
|
116 |
}
|
116 |
}
|
117 |
});
|
117 |
});
|
118 |
|
118 |
|
119 |
store = new ListStore<Collection>();
|
119 |
store = new ListStore<Collection>();
|
120 |
|
120 |
|
121 |
grille = new Grid<Collection>(store, modeleDeColonne);
|
121 |
grille = new Grid<Collection>(store, modeleDeColonne);
|
122 |
grille.setWidth("100%");
|
122 |
grille.setWidth("100%");
|
123 |
grille.setAutoExpandColumn("nom");
|
123 |
grille.setAutoExpandColumn("nom");
|
124 |
grille.getView().setAutoFill(true);
|
124 |
grille.getView().setAutoFill(true);
|
125 |
grille.getView().setForceFit(true);
|
125 |
grille.getView().setForceFit(true);
|
126 |
grille.setSelectionModel(modeleDeSelection);
|
126 |
grille.setSelectionModel(modeleDeSelection);
|
127 |
grille.addListener(Events.ViewReady, new Listener<BaseEvent>() {
|
127 |
grille.addListener(Events.ViewReady, new Listener<BaseEvent>() {
|
128 |
public void handleEvent(BaseEvent be) {
|
128 |
public void handleEvent(BaseEvent be) {
|
129 |
grille.getSelectionModel().select(0, false);
|
129 |
grille.getSelectionModel().select(0, false);
|
130 |
}
|
130 |
}
|
131 |
});
|
131 |
});
|
132 |
grille.addListener(Events.OnDoubleClick, new Listener<BaseEvent>() {
|
132 |
grille.addListener(Events.OnDoubleClick, new Listener<BaseEvent>() {
|
133 |
public void handleEvent(BaseEvent be) {
|
133 |
public void handleEvent(BaseEvent be) {
|
134 |
modifier.fireEvent(Events.Select);
|
134 |
modifier.fireEvent(Events.Select);
|
135 |
}
|
135 |
}
|
136 |
});
|
136 |
});
|
137 |
|
137 |
|
138 |
grille.addListener(Events.SortChange, new Listener<BaseEvent>() {
|
138 |
grille.addListener(Events.SortChange, new Listener<BaseEvent>() {
|
139 |
|
139 |
|
140 |
@Override
|
140 |
@Override
|
141 |
public void handleEvent(BaseEvent be) {
|
141 |
public void handleEvent(BaseEvent be) {
|
142 |
GridEvent ge = (GridEvent<Collection>) be;
|
142 |
GridEvent ge = (GridEvent<Collection>) be;
|
143 |
// TODO rajouter un test sur le sort state pour trier par nom par défaut
|
143 |
// TODO rajouter un test sur le sort state pour trier par nom par défaut
|
144 |
String tri = ge.getSortInfo().getSortField();
|
144 |
String tri = ge.getSortInfo().getSortField();
|
145 |
if(tri.equals("_structure_ville_")) {
|
145 |
if(tri.equals("_structure_ville_")) {
|
146 |
tri = "cs_ville";
|
146 |
tri = "cs_ville";
|
147 |
} else {
|
147 |
} else {
|
148 |
tri = Collection.PREFIXE+"_"+tri;
|
148 |
tri = Collection.PREFIXE+"_"+tri;
|
149 |
}
|
149 |
}
|
150 |
CollectionAsyncDao.tri = tri+" "+ge.getSortInfo().getSortDir().toString();
|
150 |
CollectionAsyncDao.tri = tri+" "+ge.getSortInfo().getSortDir().toString();
|
151 |
pagination.changePage();
|
151 |
pagination.changePage();
|
152 |
}
|
152 |
}
|
153 |
});
|
153 |
});
|
154 |
add(grille);
|
154 |
add(grille);
|
155 |
|
155 |
|
156 |
CollectionListe collectionListe = new CollectionListe();
|
156 |
CollectionListe collectionListe = new CollectionListe();
|
157 |
champFiltreRecherche = new ChampFiltreRecherche(mediateur, toolBar, collectionListe);
|
157 |
champFiltreRecherche = new ChampFiltreRecherche(mediateur, toolBar, collectionListe);
|
158 |
// Définition de la barre de pagination
|
158 |
// Définition de la barre de pagination
|
159 |
pagination = new BarrePaginationVue(collectionListe, mediateur, champFiltreRecherche);
|
159 |
pagination = new BarrePaginationVue(collectionListe, mediateur, champFiltreRecherche);
|
160 |
setBottomComponent(pagination);
|
160 |
setBottomComponent(pagination);
|
161 |
}
|
161 |
}
|
162 |
|
162 |
|
163 |
private void clicListe(Collection collection) {
|
163 |
private void clicListe(Collection collection) {
|
164 |
if (collection != null && store.getCount() > 0) {
|
164 |
if (collection != null && store.getCount() > 0) {
|
165 |
mediateur.clicListeCollection(collection);
|
165 |
mediateur.clicListeCollection(collection);
|
166 |
}
|
166 |
}
|
167 |
}
|
167 |
}
|
168 |
|
168 |
|
169 |
private void clicSupprimerCollection(List<Collection> collectionsASupprimer) {
|
169 |
private void clicSupprimerCollection(List<Collection> collectionsASupprimer) {
|
170 |
if (store.getCount() > 0) {
|
170 |
if (store.getCount() > 0) {
|
171 |
mediateur.clicSupprimerCollection(this, collectionsASupprimer);
|
171 |
mediateur.clicSupprimerCollection(this, collectionsASupprimer);
|
172 |
}
|
172 |
}
|
173 |
}
|
173 |
}
|
174 |
|
174 |
|
175 |
private void gererEtatActivationBouton() {
|
175 |
private void gererEtatActivationBouton() {
|
176 |
int nbreElementDuMagazin = store.getCount();
|
176 |
int nbreElementDuMagazin = store.getCount();
|
177 |
ajouter.enable();
|
177 |
ajouter.enable();
|
178 |
if (nbreElementDuMagazin == 0) {
|
178 |
if (nbreElementDuMagazin == 0) {
|
179 |
supprimer.disable();
|
179 |
supprimer.disable();
|
180 |
modifier.disable();
|
180 |
modifier.disable();
|
181 |
} else if (nbreElementDuMagazin > 0) {
|
181 |
} else if (nbreElementDuMagazin > 0) {
|
182 |
modifier.enable();
|
182 |
modifier.enable();
|
183 |
if (((Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT)).isIdentifie()) {
|
183 |
if (((Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT)).isIdentifie()) {
|
184 |
supprimer.enable();
|
184 |
supprimer.enable();
|
185 |
}
|
185 |
}
|
186 |
}
|
186 |
}
|
187 |
}
|
187 |
}
|
188 |
|
188 |
|
189 |
public void rafraichir(Object nouvellesDonnees) {
|
189 |
public void rafraichir(Object nouvellesDonnees) {
|
190 |
|
190 |
|
191 |
if (nouvellesDonnees instanceof CollectionListe) {
|
191 |
if (nouvellesDonnees instanceof CollectionListe) {
|
192 |
CollectionListe collections = (CollectionListe) nouvellesDonnees;
|
192 |
CollectionListe collections = (CollectionListe) nouvellesDonnees;
|
193 |
|
193 |
|
194 |
pagination.setlistePaginable(collections);
|
194 |
pagination.setlistePaginable(collections);
|
195 |
int[] pt = collections.getPageTable();
|
195 |
int[] pt = collections.getPageTable();
|
196 |
pagination.rafraichir(collections.getPageTable());
|
196 |
pagination.rafraichir(collections.getPageTable());
|
197 |
champFiltreRecherche.setListePaginable(collections);
|
197 |
champFiltreRecherche.setListePaginable(collections);
|
198 |
|
198 |
|
199 |
if (collections != null) {
|
199 |
if (collections != null) {
|
200 |
List<Collection> liste = collections.toList();
|
200 |
List<Collection> liste = collections.toList();
|
201 |
store.removeAll();
|
201 |
store.removeAll();
|
202 |
store.add(liste);
|
202 |
store.add(liste);
|
203 |
|
203 |
|
204 |
mediateur.actualiserPanneauCentral();
|
204 |
mediateur.actualiserPanneauCentral();
|
205 |
}
|
205 |
}
|
206 |
} else if (nouvellesDonnees instanceof Information) {
|
206 |
} else if (nouvellesDonnees instanceof Information) {
|
207 |
Information info = (Information) nouvellesDonnees;
|
207 |
Information info = (Information) nouvellesDonnees;
|
208 |
if (info.getType().equals("maj_utilisateur")) {
|
208 |
if (info.getType().equals("maj_utilisateur")) {
|
209 |
gererEtatActivationBouton();
|
209 |
gererEtatActivationBouton();
|
210 |
} else if (info.getType().equals("modif_collection")) {
|
210 |
} else if (info.getType().equals("modif_collection")) {
|
211 |
if(collectionSelectionnee != null) {
|
211 |
if(collectionSelectionnee != null) {
|
212 |
store.remove(indexElementSelectionne);
|
212 |
store.remove(indexElementSelectionne);
|
213 |
collectionSelectionnee = null;
|
213 |
collectionSelectionnee = null;
|
214 |
}
|
214 |
}
|
215 |
Collection collecModifiee = (Collection)info.getDonnee(0);
|
215 |
Collection collecModifiee = (Collection)info.getDonnee(0);
|
216 |
// au cas ou le bouton appliquer aurait été cliqué avant de valider
|
216 |
// au cas ou le bouton appliquer aurait été cliqué avant de valider
|
217 |
store.remove(collecModifiee);
|
217 |
store.remove(collecModifiee);
|
218 |
store.insert(collecModifiee, indexElementSelectionne);
|
218 |
store.insert(collecModifiee, indexElementSelectionne);
|
219 |
collectionSelectionnee = collecModifiee;
|
219 |
collectionSelectionnee = collecModifiee;
|
220 |
int indexElementSelectionne = store.indexOf(collectionSelectionnee);
|
220 |
int indexElementSelectionne = store.indexOf(collectionSelectionnee);
|
221 |
grille.getSelectionModel().select(indexElementSelectionne, false);
|
221 |
grille.getSelectionModel().select(indexElementSelectionne, false);
|
222 |
grille.getView().focusRow(indexElementSelectionne);
|
222 |
grille.getView().focusRow(indexElementSelectionne);
|
223 |
clicListe(collecModifiee);
|
223 |
clicListe(collecModifiee);
|
224 |
} else if (info.getType().equals("suppression_collection")) {
|
224 |
} else if (info.getType().equals("suppression_collection")) {
|
225 |
// Affichage d'un message d'information
|
225 |
// Affichage d'un message d'information
|
226 |
InfoLogger.display(i18nC.suppressionCollection(), info.toString().replaceAll("\n", "<br />"));
|
226 |
InfoLogger.display(i18nC.suppressionCollection(), info.toString().replaceAll("\n", "<br />"));
|
227 |
|
227 |
|
228 |
supprimerCollectionsSelectionnees();
|
228 |
supprimerCollectionsSelectionnees();
|
229 |
|
229 |
|
230 |
gererEtatActivationBouton();
|
230 |
gererEtatActivationBouton();
|
231 |
}
|
231 |
}
|
232 |
} else {
|
232 |
} else {
|
233 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
233 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
234 |
}
|
234 |
}
|
235 |
layout();
|
235 |
layout();
|
236 |
}
|
236 |
}
|
237 |
|
237 |
|
238 |
private void supprimerCollectionsSelectionnees() {
|
238 |
private void supprimerCollectionsSelectionnees() {
|
239 |
List<Collection> collectionsSelectionnees = grille.getSelectionModel().getSelectedItems();
|
239 |
List<Collection> collectionsSelectionnees = grille.getSelectionModel().getSelectedItems();
|
240 |
Iterator<Collection> it = collectionsSelectionnees.iterator();
|
240 |
Iterator<Collection> it = collectionsSelectionnees.iterator();
|
241 |
while (it.hasNext()) {
|
241 |
while (it.hasNext()) {
|
242 |
grille.getStore().remove(it.next());
|
242 |
grille.getStore().remove(it.next());
|
243 |
}
|
243 |
}
|
244 |
layout(true);
|
244 |
layout(true);
|
245 |
}
|
245 |
}
|
246 |
}
|
246 |
}
|