Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 560 → Rev 564

/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.java
18,7 → 18,8
 
public class MoteurRechercheVue extends Composite implements MoteurRecherchePresenteur.Vue {
 
interface Binder extends UiBinder<Widget, MoteurRechercheVue> {}
interface Binder extends UiBinder<Widget, MoteurRechercheVue> {
}
 
private static Binder uiBinder = GWT.create(Binder.class);
private String labelRecherche = "";
70,15 → 71,15
public String getValeurRechercheSimple() {
return recherchePrincipale.getText();
}
 
public void setValeurRechercheSimple(String valeurRecherche) {
recherchePrincipale.setText(valeurRecherche);
}
 
public HasClickHandlers getChampSaisieCliquable() {
return recherchePrincipale;
}
 
public String getContientMots() {
return contientMots.getText();
}
86,7 → 87,7
public void setContientMots(String mots) {
contientMots.setText(mots);
}
 
public String getDepartement() {
return departement.getText();
}
126,7 → 127,7
public String getDate() {
return date.getText();
}
 
public void focusSaisie() {
this.recherchePrincipale.setFocus(true);
}
134,17 → 135,17
public void ajouterVue(HasWidgets composite) {
composite.add(this.asWidget());
}
 
public void basculerAffichageZoneCache() {
rechercheAvancee.setVisible(!rechercheAvancee.isVisible());
recherchePrincipale.setVisible(!recherchePrincipale.isVisible());
boutonRecherche.setVisible(!boutonRecherche.isVisible());
}
 
public void nettoyer() {
chargerValeursRecherchePrecedente(new InformationsRecherche());
}
 
public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche) {
recherchePrincipale.setText(informationsRecherche.getRechercheLibre());
contientMots.setText(informationsRecherche.getRechercheLibre());
202,4 → 203,34
 
recherchePrecedente.setText(texteRecherchePrecedente.toString());
}
 
@Override
public HasKeyPressHandlers getChampsFamille() {
return famille;
}
 
@Override
public HasKeyPressHandlers getChampsGenre() {
return genre;
}
 
@Override
public HasKeyPressHandlers getChampsTag() {
return tag;
}
 
@Override
public HasKeyPressHandlers getChampsMotCle() {
return motCle;
}
 
@Override
public HasKeyPressHandlers getChampsAuteur() {
return auteur;
}
 
@Override
public HasKeyPressHandlers getChampsDate() {
return date;
}
}
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherchePresenteur.java
76,6 → 76,19
public void focusSaisie();
 
public void nettoyer();
 
public HasKeyPressHandlers getChampsFamille();
 
public HasKeyPressHandlers getChampsGenre();
 
public HasKeyPressHandlers getChampsTag();
 
public HasKeyPressHandlers getChampsMotCle();
 
public HasKeyPressHandlers getChampsAuteur();
 
public HasKeyPressHandlers getChampsDate();
 
}
 
private Vue vue;
112,10 → 125,6
gererEvenements();
}
 
private Vue getVue() {
return vue;
}
 
public ModeRecherche getMode() {
return modeRecherche;
}
249,8 → 258,33
}
}
});
 
vue.getChampsAuteur().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
vue.getChampsDate().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
vue.getChampsFamille().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
vue.getChampsGenre().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
vue.getChampsMotCle().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
vue.getChampsTag().addKeyPressHandler(createKeyboardAdvancedSearchHandler());
 
}
 
public KeyPressHandler createKeyboardAdvancedSearchHandler() {
return new KeyPressHandler() {
public void onKeyPress(KeyPressEvent event) {
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
vue.basculerAffichageZoneCache();
collecterInfosRecherche();
afficherRequeteEtLancerRecherche();
}
}
};
}
 
private void nettoyerChamps() {
completionCommunesPresenteur.nettoyer();
completionTaxonsPresenteur.nettoyer();
272,7 → 306,6
informationRecherche.setDate(vue.getDate());
}
 
 
if (estPourRechercheImages()) {
CacheClient.getInstance().setPageCouranteRechercheImages(1);
CacheClient.getInstance().setInformationsRechercheImage(informationRecherche);