Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1248 → Rev 1249

/branches/v1.0-syrah/src/org/tela_botanica/client/vues/commentaire/CommentaireForm.java
95,7 → 95,6
projetsCombo.setForceSelection(true);
projetsCombo.setAllowBlank(false);
projetsCombo.setValidator(new Validator() {
@Override
public String validate(Field<?> champ, String valeurAValider) {
String retour = null;
if (UtilString.isEmpty(valeurAValider)
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/commentaire/CommentaireListeVue.java
141,7 → 141,6
vueDeGroupe.setForceFit(true);
vueDeGroupe.setAutoFill(true);
vueDeGroupe.setGroupRenderer(new GridGroupRenderer() {
@Override
public String render(GroupColumnData data) {
String f = modeleDesColonnes.getColumnById(data.field).getHeader();
String l = data.models.size() == 1 ? i18nC.commentaireSingulier() : i18nC.commentairePluriel();
155,13 → 154,11
grille.setAutoExpandColumn("_titre_");
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);
}
175,7 → 172,6
private ColumnConfig creerColonneType() {
GridCellRenderer<Commentaire> typeRendu = new GridCellRenderer<Commentaire>() {
@Override
public String render(Commentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Commentaire> store, Grid<Commentaire> grid) {
// FIXME : créer une classe Ontologie qui mixe le code ci-dessous et tout ce qui concerne l'ontologie dans DetailVue
String type = "";
213,7 → 209,6
private ColumnConfig creerColonneAcces() {
GridCellRenderer<Commentaire> accesRendu = new GridCellRenderer<Commentaire>() {
@Override
public String render(Commentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Commentaire> store, Grid<Commentaire> grid) {
String acces = (model.etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
model.set("_public_", acces);
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/projet/ProjetListeVue.java
122,7 → 122,6
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);
}
129,7 → 128,6
});
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/projet/ProjetForm.java
176,7 → 176,6
markPublicChp = new CheckBox();
markPublicChp.setFieldLabel(i18nC.projetMarkPublic());
markPublicChp.addListener(Events.Change, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
if (markPublicChp.getValue()) {
indexationFieldset.show();
199,7 → 198,6
indexationFieldset.setLayout(layout);
indexationFieldset.hide();
indexationFieldset.addListener(Events.Hide, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
indexationHeureChp.clear();
indexationFrequenceChp.clear();
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/publication/PublicationListeVue.java
126,13 → 126,11
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);
}
146,7 → 144,6
private ColumnConfig creerColonneEditeur() {
GridCellRenderer<Publication> editeurRendu = new GridCellRenderer<Publication>() {
@Override
public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
String editeur = model.getNomEditeur();
model.set("_editeur_", editeur);
160,7 → 157,6
private ColumnConfig creerColonneAnneePublication() {
GridCellRenderer<Publication> datePublicationRendu = new GridCellRenderer<Publication>() {
@Override
public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
String annee = model.getAnneeParution();
model.set("_annee_", annee);
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/publication/PublicationForm.java
158,7 → 158,6
Button ajouterAuteurBouton = new Button(i18nC.publicationAuteurBoutonAjouter());
ajouterAuteurBouton.setIcon(Images.ICONES.ajouter());
ajouterAuteurBouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent be) {
creerChampAuteurEtBoutonSupprimer(null);
}
244,7 → 243,6
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("")) {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/personne/PersonneFormPublication.java
192,7 → 192,6
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();
205,7 → 204,6
Button bouton = new Button(i18nC.modifier());
bouton.setIcon(Images.ICONES.vcardModifier());
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
PublicationAPersonne publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
251,7 → 249,6
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)) {
277,7 → 274,6
Button bouton = new Button(i18nC.supprimer());
bouton.setIcon(Images.ICONES.vcardSupprimer());
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
PublicationAPersonne publicationSaisieSelectionnee = grille.getSelectionModel().getSelectedItem();
if (publicationSaisieSelectionnee == null) {
294,7 → 290,6
Button bouton = new Button(i18nC.rafraichir());
bouton.setIcon(Images.ICONES.rafraichir());
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
actualiserGrille();
}
334,7 → 329,6
}
});
comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
if (publicationsSaisiesComboBox.getValue() instanceof Publication) {
Publication publicationSaisieSelectionne = publicationsSaisiesComboBox.getValue();
458,7 → 452,6
typeRelationCombo.addListener(Events.Select, Formulaire.creerEcouteurChampObligatoire());
CellEditor editeurRelation = new CellEditor(typeRelationCombo) {
@Override
public Object preProcessValue(Object valeur) {
Valeur retour = null;
if (valeur != null ) {
473,7 → 466,6
return retour;
}
 
@Override
public Object postProcessValue(Object valeur) {
String retour = null;
if (valeur != null ) {
487,7 → 479,6
};
GridCellRenderer<PublicationAPersonne> relationRendu = new GridCellRenderer<PublicationAPersonne>() {
@Override
public String render(PublicationAPersonne modele, String property, ColumnData config, int rowIndex, int colIndex, ListStore<PublicationAPersonne> store, Grid<PublicationAPersonne> grille) {
// Gestion du texte afficher dans la cellule
String role = modele.get("_role_");
540,7 → 531,6
private ColumnConfig creerColonneEditeur() {
GridCellRenderer<PublicationAPersonne> editeurRendu = new GridCellRenderer<PublicationAPersonne>() {
@Override
public String render(PublicationAPersonne model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<PublicationAPersonne> store, Grid<PublicationAPersonne> grid) {
String editeur = model.getPublicationLiee().getNomEditeur();
model.set("_editeur_", editeur);
554,7 → 544,6
private ColumnConfig creerColonneAnneePublication() {
GridCellRenderer<PublicationAPersonne> datePublicationRendu = new GridCellRenderer<PublicationAPersonne>() {
@Override
public String render(PublicationAPersonne model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<PublicationAPersonne> store, Grid<PublicationAPersonne> grid) {
String annee = model.getPublicationLiee().getAnneeParution();
model.set("_annee_", annee);
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/personne/PersonneListeVue.java
119,7 → 119,6
grille.getView().setAutoFill(true);
grille.getView().setForceFit(true);
grille.addListener(Events.ViewReady, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
grille.getStore().sort("fmt_nom_complet", SortDir.ASC);
grille.getSelectionModel().select(0, false);
126,7 → 125,6
}
});
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/CollectionListeVue.java
115,13 → 115,11
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,7 → 109,6
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("")) {
136,7 → 135,6
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("")) {
161,7 → 159,6
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,7 → 98,6
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,7 → 248,6
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) {
265,7 → 264,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 → 292,6
}
});
comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
if (commentairesSaisisComboBox.getValue() instanceof Commentaire) {
Commentaire commentaireSaisiSelectionnee = commentairesSaisisComboBox.getValue();
431,7 → 428,6
};
 
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);
451,7 → 447,6
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);
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPersonne.java
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]+")) {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPublication.java
144,7 → 144,6
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();
157,7 → 156,6
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();
203,7 → 201,6
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)) {
229,7 → 226,6
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) {
246,7 → 242,6
Button bouton = new Button(i18nC.rafraichir());
bouton.setIcon(Images.ICONES.rafraichir());
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
actualiserGrille();
}
283,7 → 278,6
}
});
comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
if (publicationsSaisiesComboBox.getValue() instanceof Publication) {
Publication publicationSaisieSelectionne = publicationsSaisiesComboBox.getValue();
393,7 → 387,6
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);
407,7 → 400,6
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/structure/StructureListeVue.java
111,13 → 111,11
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/structure/StructureDetailVue.java
199,8 → 199,9
identificationParams.set("pays", pays);
identificationParams.set("latitude_longitude", latitudeLongitude);
identificationParams.set("tel", structure.getTelephoneFixe());
identificationParams.set("fax", structure.getFax());
//FIXME identificationParams.set("tel", structure.getTelephoneFixe());
//identificationParams.set("fax", structure.getFax());
identificationParams.set("courriel", structure.getCourriel());
identificationParams.set("web", web);