164,7 → 164,6 |
bouton.setIcon(Images.ICONES.vcardAjouter()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
|
@Override |
public void componentSelected(ButtonEvent ce) { |
fenetreFormulaire = creerFenetreModaleAvecFormulairePersonne(Formulaire.MODE_AJOUTER); |
fenetreFormulaire.show(); |
177,7 → 176,6 |
Button bouton = new Button(i18nC.modifier()); |
bouton.setIcon(Images.ICONES.vcardModifier()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
CollectionAPersonne personneSaisiSelectionne = grille.getSelectionModel().getSelectedItem(); |
if (personneSaisiSelectionne == null) { |
222,7 → 220,6 |
|
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulairePersonne(final FenetreForm fenetre, final PersonneForm formulaire) { |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
String code = ((Button) ce.getComponent()).getData("code"); |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) { |
248,7 → 245,6 |
Button bouton = new Button(i18nC.supprimer()); |
bouton.setIcon(Images.ICONES.vcardSupprimer()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
CollectionAPersonne personneSaisiSelectionnee = grille.getSelectionModel().getSelectedItem(); |
if (personneSaisiSelectionnee == null) { |
265,7 → 261,6 |
Button bouton = new Button(i18nC.rafraichir()); |
bouton.setIcon(Images.ICONES.rafraichir()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
actualiserGrille(); |
} |
294,7 → 289,6 |
} |
}); |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
if (personnesSaisisComboBox.getValue() instanceof Personne) { |
Personne personneSaisiSelectionnee = personnesSaisisComboBox.getValue(); |
417,7 → 411,6 |
typeRelationCombo.addListener(Events.Select, Formulaire.creerEcouteurChampObligatoire()); |
|
CellEditor editeurRelation = new CellEditor(typeRelationCombo) { |
@Override |
public Object preProcessValue(Object valeur) { |
Valeur retour = null; |
if (valeur != null ) { |
433,7 → 426,6 |
return retour; |
} |
|
@Override |
public Object postProcessValue(Object valeur) { |
String retour = null; |
if (valeur != null ) { |
447,7 → 439,6 |
}; |
|
GridCellRenderer<CollectionAPersonne> relationRendu = new GridCellRenderer<CollectionAPersonne>() { |
@Override |
public String render(CollectionAPersonne modele, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPersonne> store, Grid<CollectionAPersonne> grille) { |
// Gestion du texte afficher dans la cellule |
String role = modele.get("_role_"); |
468,7 → 459,6 |
|
public ColumnConfig creerColonneDeces() { |
GridCellRenderer<CollectionAPersonne> decesRendu = new GridCellRenderer<CollectionAPersonne>() { |
@Override |
public String render(CollectionAPersonne modele, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPersonne> store, Grid<CollectionAPersonne> grid) { |
String deces = modele.getPersonne().getDeces(); |
if (listeIon != null && modele.getPersonne().getDeces().matches("[0-9]+")) { |