/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPersonne.java |
---|
164,6 → 164,7 |
bouton.setIcon(Images.ICONES.vcardAjouter()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
fenetreFormulaire = creerFenetreModaleAvecFormulairePersonne(Formulaire.MODE_AJOUTER); |
fenetreFormulaire.show(); |
176,6 → 177,7 |
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) { |
220,6 → 222,7 |
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)) { |
245,6 → 248,7 |
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) { |
261,6 → 265,7 |
Button bouton = new Button(i18nC.rafraichir()); |
bouton.setIcon(Images.ICONES.rafraichir()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
actualiserGrille(); |
} |
289,6 → 294,7 |
} |
}); |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
if (personnesSaisisComboBox.getValue() instanceof Personne) { |
Personne personneSaisiSelectionnee = personnesSaisisComboBox.getValue(); |
411,6 → 417,7 |
typeRelationCombo.addListener(Events.Select, Formulaire.creerEcouteurChampObligatoire()); |
CellEditor editeurRelation = new CellEditor(typeRelationCombo) { |
@Override |
public Object preProcessValue(Object valeur) { |
Valeur retour = null; |
if (valeur != null ) { |
426,6 → 433,7 |
return retour; |
} |
@Override |
public Object postProcessValue(Object valeur) { |
String retour = null; |
if (valeur != null ) { |
439,6 → 447,7 |
}; |
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_"); |
459,6 → 468,7 |
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]+")) { |
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPublication.java |
---|
144,6 → 144,7 |
Button bouton = new Button(i18nC.ajouter()); |
bouton.setIcon(Images.ICONES.vcardAjouter()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
fenetreFormulaire = creerFenetreModaleAvecFormulairePersonne(Formulaire.MODE_AJOUTER); |
fenetreFormulaire.show(); |
156,6 → 157,7 |
Button bouton = new Button(i18nC.modifier()); |
bouton.setIcon(Images.ICONES.vcardModifier()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem(); |
201,6 → 203,7 |
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulairePublication(final FenetreForm fenetre, final PublicationForm 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)) { |
226,6 → 229,7 |
Button bouton = new Button(i18nC.supprimer()); |
bouton.setIcon(Images.ICONES.vcardSupprimer()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
CollectionAPublication publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem(); |
if (publicationSaisieSelectionnee == null) { |
242,6 → 246,7 |
Button bouton = new Button(i18nC.rafraichir()); |
bouton.setIcon(Images.ICONES.rafraichir()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
actualiserGrille(); |
} |
278,6 → 283,7 |
} |
}); |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
if (publicationsSaisiesComboBox.getValue() instanceof Publication) { |
Publication publicationSaisieSelectionne = publicationsSaisiesComboBox.getValue(); |
387,6 → 393,7 |
private ColumnConfig creerColonneEditeur() { |
GridCellRenderer<CollectionAPublication> editeurRendu = new GridCellRenderer<CollectionAPublication>() { |
@Override |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) { |
String editeur = model.getPublication().getNomEditeur(); |
model.set("_editeur_", editeur); |
400,6 → 407,7 |
private ColumnConfig creerColonneAnneePublication() { |
GridCellRenderer<CollectionAPublication> datePublicationRendu = new GridCellRenderer<CollectionAPublication>() { |
@Override |
public String render(CollectionAPublication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionAPublication> store, Grid<CollectionAPublication> grid) { |
String annee = model.getPublication().getAnneeParution(); |
model.set("_annee_", annee); |
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionListeVue.java |
---|
115,11 → 115,13 |
grille.getView().setForceFit(true); |
grille.setSelectionModel(modeleDeSelection); |
grille.addListener(Events.ViewReady, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
grille.getSelectionModel().select(0, false); |
} |
}); |
grille.addListener(Events.OnDoubleClick, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
modifier.fireEvent(Events.Select); |
} |
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormGeneral.java |
---|
109,6 → 109,7 |
projetsCombo.setDisplayField("nom"); |
projetsCombo.setForceSelection(true); |
projetsCombo.setValidator(new Validator() { |
@Override |
public String validate(Field<?> field, String value) { |
String retour = null; |
if (field.getRawValue().equals("")) { |
135,6 → 136,7 |
structuresCombo.setDisplayField("nom"); |
structuresCombo.setForceSelection(true); |
structuresCombo.setValidator(new Validator() { |
@Override |
public String validate(Field<?> field, String value) { |
String retour = null; |
if (field.getRawValue().equals("")) { |
159,6 → 161,7 |
collectionsCombo.setDisplayField("nom"); |
collectionsCombo.setForceSelection(true); |
collectionsCombo.setValidator(new Validator() { |
@Override |
public String validate(Field<?> field, String value) { |
String retour = null; |
if (field.getRawValue().equals("")) { |
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionForm.java |
---|
98,6 → 98,7 |
principalFieldSet.add(nomChp, new FormData(450, 0)); |
Listener<BaseEvent> ecouteurTypeCollection = new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
Valeur valeur = typesCollectionCombo.getValue(); |
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormCommentaire.java |
---|
248,6 → 248,7 |
Button bouton = new Button(i18nC.supprimer()); |
bouton.setIcon(Images.ICONES.vcardSupprimer()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
CollectionACommentaire commentaireSaisiSelectionnee = grille.getSelectionModel().getSelectedItem(); |
if (commentaireSaisiSelectionnee == null) { |
264,6 → 265,7 |
Button bouton = new Button(i18nC.rafraichir()); |
bouton.setIcon(Images.ICONES.rafraichir()); |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() { |
@Override |
public void componentSelected(ButtonEvent ce) { |
actualiserGrille(); |
} |
292,6 → 294,7 |
} |
}); |
comboBox.addListener(Events.Select, new Listener<BaseEvent>() { |
@Override |
public void handleEvent(BaseEvent be) { |
if (commentairesSaisisComboBox.getValue() instanceof Commentaire) { |
Commentaire commentaireSaisiSelectionnee = commentairesSaisisComboBox.getValue(); |
428,6 → 431,7 |
}; |
GridCellRenderer<CollectionACommentaire> typeRendu = new GridCellRenderer<CollectionACommentaire>() { |
@Override |
public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) { |
String type = model.get("_type_"); |
Debug.log("Initialisation type origine :"+type); |
447,6 → 451,7 |
private ColumnConfig creerColonneAcces() { |
GridCellRenderer<CollectionACommentaire> accesRendu = new GridCellRenderer<CollectionACommentaire>() { |
@Override |
public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) { |
String acces = (model.getCommentaire().etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee()); |
model.set("_public_", acces); |