| Line 142... |
Line 142... |
| 142 |
|
142 |
|
| 143 |
private Button creerBoutonAjouter() {
|
143 |
private Button creerBoutonAjouter() {
|
| 144 |
Button bouton = new Button(i18nC.ajouter());
|
144 |
Button bouton = new Button(i18nC.ajouter());
|
| 145 |
bouton.setIcon(Images.ICONES.vcardAjouter());
|
145 |
bouton.setIcon(Images.ICONES.vcardAjouter());
|
| 146 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
| 147 |
@Override
|
146 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
| 148 |
public void componentSelected(ButtonEvent ce) {
|
147 |
public void componentSelected(ButtonEvent ce) {
|
| 149 |
fenetreFormulaire = creerFenetreModaleAvecFormulairePersonne(Formulaire.MODE_AJOUTER);
|
148 |
fenetreFormulaire = creerFenetreModaleAvecFormulairePersonne(Formulaire.MODE_AJOUTER);
|
| 150 |
fenetreFormulaire.show();
|
149 |
fenetreFormulaire.show();
|
| 151 |
}
|
150 |
}
|
| Line 155... |
Line 154... |
| 155 |
|
154 |
|
| 156 |
private Button creerBoutonModifier() {
|
155 |
private Button creerBoutonModifier() {
|
| 157 |
Button bouton = new Button(i18nC.modifier());
|
156 |
Button bouton = new Button(i18nC.modifier());
|
| 158 |
bouton.setIcon(Images.ICONES.vcardModifier());
|
157 |
bouton.setIcon(Images.ICONES.vcardModifier());
|
| 159 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
| 160 |
@Override
|
158 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
| 161 |
public void componentSelected(ButtonEvent ce) {
|
159 |
public void componentSelected(ButtonEvent ce) {
|
| Line 162... |
Line 160... |
| 162 |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
|
160 |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
|
| 163 |
|
161 |
|
| Line 201... |
Line 199... |
| 201 |
return formulairePublication;
|
199 |
return formulairePublication;
|
| 202 |
}
|
200 |
}
|
| Line 203... |
Line 201... |
| 203 |
|
201 |
|
| 204 |
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulairePublication(final FenetreForm fenetre, final PublicationForm formulaire) {
|
202 |
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulairePublication(final FenetreForm fenetre, final PublicationForm formulaire) {
|
| 205 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
- |
|
| 206 |
@Override
|
203 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
| 207 |
public void componentSelected(ButtonEvent ce) {
|
204 |
public void componentSelected(ButtonEvent ce) {
|
| 208 |
String code = ((Button) ce.getComponent()).getData("code");
|
205 |
String code = ((Button) ce.getComponent()).getData("code");
|
| 209 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
206 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
| 210 |
if (formulaire.soumettreFormulaire()) {
|
207 |
if (formulaire.soumettreFormulaire()) {
|
| Line 227... |
Line 224... |
| 227 |
|
224 |
|
| 228 |
private Button creerBoutonSupprimer() {
|
225 |
private Button creerBoutonSupprimer() {
|
| 229 |
Button bouton = new Button(i18nC.supprimer());
|
226 |
Button bouton = new Button(i18nC.supprimer());
|
| 230 |
bouton.setIcon(Images.ICONES.vcardSupprimer());
|
227 |
bouton.setIcon(Images.ICONES.vcardSupprimer());
|
| 231 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
| 232 |
@Override
|
228 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
| 233 |
public void componentSelected(ButtonEvent ce) {
|
229 |
public void componentSelected(ButtonEvent ce) {
|
| 234 |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
|
230 |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
|
| 235 |
if (publicationSaisieSelectionnee == null) {
|
231 |
if (publicationSaisieSelectionnee == null) {
|
| 236 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerPublication());
|
232 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerPublication());
|
| Line 244... |
Line 240... |
| 244 |
|
240 |
|
| 245 |
private Button creerBoutonRafraichir() {
|
241 |
private Button creerBoutonRafraichir() {
|
| 246 |
Button bouton = new Button(i18nC.rafraichir());
|
242 |
Button bouton = new Button(i18nC.rafraichir());
|
| 247 |
bouton.setIcon(Images.ICONES.rafraichir());
|
243 |
bouton.setIcon(Images.ICONES.rafraichir());
|
| 248 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
| 249 |
@Override
|
244 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
| 250 |
public void componentSelected(ButtonEvent ce) {
|
245 |
public void componentSelected(ButtonEvent ce) {
|
| 251 |
actualiserGrille();
|
246 |
actualiserGrille();
|
| 252 |
}
|
247 |
}
|
| 253 |
});
|
248 |
});
|
| Line 281... |
Line 276... |
| 281 |
}
|
276 |
}
|
| 282 |
}
|
277 |
}
|
| 283 |
}
|
278 |
}
|
| 284 |
});
|
279 |
});
|
| 285 |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
|
280 |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
|
| 286 |
@Override
|
- |
|
| 287 |
public void handleEvent(BaseEvent be) {
|
281 |
public void handleEvent(BaseEvent be) {
|
| 288 |
if (publicationsSaisiesComboBox.getValue() instanceof Publication) {
|
282 |
if (publicationsSaisiesComboBox.getValue() instanceof Publication) {
|
| 289 |
Publication publicationSaisieSelectionne = publicationsSaisiesComboBox.getValue();
|
283 |
Publication publicationSaisieSelectionne = publicationsSaisiesComboBox.getValue();
|
| 290 |
ajouterDansGrille(publicationSaisieSelectionne);
|
284 |
ajouterDansGrille(publicationSaisieSelectionne);
|
| 291 |
publicationsSaisiesComboBox.setValue(null);
|
285 |
publicationsSaisiesComboBox.setValue(null);
|
| Line 391... |
Line 385... |
| 391 |
return grillePublications;
|
385 |
return grillePublications;
|
| 392 |
}
|
386 |
}
|
| Line 393... |
Line 387... |
| 393 |
|
387 |
|
| 394 |
private ColumnConfig creerColonneEditeur() {
|
388 |
private ColumnConfig creerColonneEditeur() {
|
| 395 |
GridCellRenderer<CollectionAPublication> editeurRendu = new GridCellRenderer<CollectionAPublication>() {
|
- |
|
| 396 |
@Override
|
389 |
GridCellRenderer<CollectionAPublication> editeurRendu = new GridCellRenderer<CollectionAPublication>() {
|
| 397 |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) {
|
390 |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) {
|
| 398 |
String editeur = model.getPublication().getNomEditeur();
|
391 |
String editeur = model.getPublication().getNomEditeur();
|
| 399 |
model.set("_editeur_", editeur);
|
392 |
model.set("_editeur_", editeur);
|
| 400 |
return editeur;
|
393 |
return editeur;
|
| Line 405... |
Line 398... |
| 405 |
return editeurColonne;
|
398 |
return editeurColonne;
|
| 406 |
}
|
399 |
}
|
| Line 407... |
Line 400... |
| 407 |
|
400 |
|
| 408 |
private ColumnConfig creerColonneAnneePublication() {
|
401 |
private ColumnConfig creerColonneAnneePublication() {
|
| 409 |
GridCellRenderer<CollectionAPublication> datePublicationRendu = new GridCellRenderer<CollectionAPublication>() {
|
- |
|
| 410 |
@Override
|
402 |
GridCellRenderer<CollectionAPublication> datePublicationRendu = new GridCellRenderer<CollectionAPublication>() {
|
| 411 |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) {
|
403 |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) {
|
| 412 |
String annee = model.getPublication().getAnneeParution();
|
404 |
String annee = model.getPublication().getAnneeParution();
|
| 413 |
model.set("_annee_", annee);
|
405 |
model.set("_annee_", annee);
|
| 414 |
return annee;
|
406 |
return annee;
|