Line 28... |
Line 28... |
28 |
@UiField
|
28 |
@UiField
|
29 |
Panel rechercheAvancee,taxon;
|
29 |
Panel rechercheAvancee, taxon;
|
30 |
@UiField
|
30 |
@UiField
|
31 |
Label lienRechercheAvancee, recherchePrecedente;
|
31 |
Label lienRechercheAvancee, recherchePrecedente;
|
32 |
@UiField
|
32 |
@UiField
|
33 |
Button boutonRecherche, boutonRechercheAvancee, boutonFermer;
|
33 |
Button boutonRecherche, boutonRechercheAvancee, boutonFermer, boutonVider;
|
34 |
@UiField
|
34 |
@UiField
|
35 |
TextBox recherchePrincipale, departement, commune, famille, genre, tag, motCle, auteur, date;
|
35 |
TextBox recherchePrincipale, departement, commune, famille, genre, tag, motCle, auteur, date;
|
Line 36... |
Line 36... |
36 |
|
36 |
|
37 |
public MoteurRechercheVue(String labelRecherche) {
|
37 |
public MoteurRechercheVue(String labelRecherche) {
|
Line 51... |
Line 51... |
51 |
}
|
51 |
}
|
Line 52... |
Line 52... |
52 |
|
52 |
|
53 |
@Override
|
53 |
@Override
|
54 |
public void basculerAffichageZoneCache() {
|
54 |
public void basculerAffichageZoneCache() {
|
- |
|
55 |
rechercheAvancee.setVisible(!rechercheAvancee.isVisible());
|
- |
|
56 |
recherchePrincipale.setVisible(!recherchePrincipale.isVisible());
|
55 |
rechercheAvancee.setVisible(!rechercheAvancee.isVisible());
|
57 |
boutonRecherche.setVisible(!boutonRecherche.isVisible());
|
Line 56... |
Line 58... |
56 |
}
|
58 |
}
|
57 |
|
59 |
|
58 |
@Override
|
60 |
@Override
|
Line 64... |
Line 66... |
64 |
public HasClickHandlers getBoutonFermer() {
|
66 |
public HasClickHandlers getBoutonFermer() {
|
65 |
return boutonFermer;
|
67 |
return boutonFermer;
|
66 |
}
|
68 |
}
|
Line 67... |
Line 69... |
67 |
|
69 |
|
- |
|
70 |
@Override
|
- |
|
71 |
public HasClickHandlers getBoutonVider() {
|
- |
|
72 |
return boutonVider;
|
- |
|
73 |
}
|
- |
|
74 |
|
68 |
@Override
|
75 |
@Override
|
69 |
public HasClickHandlers getBoutonRechercheAvancee() {
|
76 |
public HasClickHandlers getBoutonRechercheAvancee() {
|
70 |
return boutonRechercheAvancee;
|
77 |
return boutonRechercheAvancee;
|
Line 71... |
Line 78... |
71 |
}
|
78 |
}
|
Line 88... |
Line 95... |
88 |
@Override
|
95 |
@Override
|
89 |
public void setValeurRechercheSimple(String valeurRecherche) {
|
96 |
public void setValeurRechercheSimple(String valeurRecherche) {
|
90 |
recherchePrincipale.setText(valeurRecherche);
|
97 |
recherchePrincipale.setText(valeurRecherche);
|
91 |
}
|
98 |
}
|
Line 92... |
Line 99... |
92 |
|
99 |
|
93 |
public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche) {
|
- |
|
94 |
getAuteur().setText(informationsRecherche.getAuteur());
|
- |
|
95 |
getCommune().setText(informationsRecherche.getCommune());
|
- |
|
96 |
getDate().setText(informationsRecherche.getDate());
|
- |
|
97 |
getDepartement().setText(informationsRecherche.getDepartement());
|
- |
|
98 |
getFamille().setText(informationsRecherche.getFamille());
|
- |
|
99 |
getMotCle().setText(informationsRecherche.getMotClef());
|
- |
|
Line -... |
Line 100... |
- |
|
100 |
public void chargerValeursRechercheSimplePrecedente(InformationsRecherche informationsRecherche) {
|
100 |
|
101 |
|
101 |
|
102 |
this.nettoyer();
|
102 |
if (informationsRecherche.getRechercheLibre() != null && !informationsRecherche.getRechercheLibre().equals("")) {
|
103 |
if (informationsRecherche.getRechercheLibre() != null && !informationsRecherche.getRechercheLibre().equals("")) {
|
- |
|
104 |
getRecherchePrincipale().setText(informationsRecherche.getRechercheLibre());
|
- |
|
105 |
}
|
- |
|
106 |
afficherLigneInfoRecherche(informationsRecherche);
|
- |
|
107 |
}
|
- |
|
108 |
|
- |
|
109 |
public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche) {
|
- |
|
110 |
informationsRecherche.setRechercheLibre(null);
|
- |
|
111 |
getRecherchePrincipale().setText("");
|
- |
|
112 |
getDepartement().setText(informationsRecherche.getDepartement());
|
- |
|
113 |
getCommune().setText(informationsRecherche.getCommune());
|
- |
|
114 |
getFamille().setText(informationsRecherche.getFamille());
|
- |
|
115 |
getGenre().setText(informationsRecherche.getGenre());
|
- |
|
116 |
getTag().setText(informationsRecherche.getTag());
|
- |
|
117 |
getMotCle().setText(informationsRecherche.getMotClef());
|
Line 103... |
Line 118... |
103 |
getRecherchePrincipale().setText(informationsRecherche.getRechercheLibre());
|
118 |
getAuteur().setText(informationsRecherche.getAuteur());
|
104 |
}
|
119 |
getDate().setText(informationsRecherche.getDate());
|
Line 105... |
Line 120... |
105 |
|
120 |
|
Line 112... |
Line 127... |
112 |
*
|
127 |
*
|
113 |
* @param informationRecherche
|
128 |
* @param informationRecherche
|
114 |
*/
|
129 |
*/
|
115 |
private void afficherLigneInfoRecherche(InformationsRecherche informationRecherche) {
|
130 |
private void afficherLigneInfoRecherche(InformationsRecherche informationRecherche) {
|
Line -... |
Line 131... |
- |
|
131 |
|
116 |
|
132 |
//tax dep com fam gen ta mo au date
|
- |
|
133 |
StringBuffer texteRecherchePrecedente = new StringBuffer();
|
117 |
StringBuffer texteRecherchePrecedente = new StringBuffer();
|
134 |
|
118 |
if (informationRecherche.getRechercheLibre()!=null&&!informationRecherche.getRechercheLibre().equals("")) {
|
135 |
if (informationRecherche.getRechercheLibre()!=null&&!informationRecherche.getRechercheLibre().equals("")) {
|
119 |
texteRecherchePrecedente.append(I18n.getVocabulary().rechercheLibre() + ":" + informationRecherche.getRechercheLibre() + " ");
|
136 |
texteRecherchePrecedente.append(I18n.getVocabulary().rechercheLibre() + ":" + informationRecherche.getRechercheLibre() + " ");
|
120 |
}
|
- |
|
121 |
if (!informationRecherche.getAuteur().equals("")) {
|
- |
|
122 |
texteRecherchePrecedente.append(I18n.getVocabulary().auteur() + ":" + informationRecherche.getAuteur() + " ");
|
- |
|
123 |
}
|
137 |
}
|
124 |
if (!informationRecherche.getCommune().equals("")) {
|
- |
|
125 |
texteRecherchePrecedente.append(I18n.getVocabulary().commune() + ":" + informationRecherche.getCommune() + " ");
|
- |
|
126 |
}
|
- |
|
127 |
if (!informationRecherche.getDate().equals("")) {
|
138 |
if (informationRecherche.getTaxon() != null&&!informationRecherche.getTaxon().equals("")) {
|
128 |
texteRecherchePrecedente.append(I18n.getVocabulary().date() + ":" + informationRecherche.getDate() + " ");
|
139 |
texteRecherchePrecedente.append(I18n.getVocabulary().taxon() + ":" + informationRecherche.getTaxon() + " ");
|
129 |
}
|
140 |
}
|
130 |
if (!informationRecherche.getDepartement().equals("")) {
|
141 |
if (informationRecherche.getDepartement()!=null && !informationRecherche.getDepartement().equals("")) {
|
131 |
texteRecherchePrecedente.append(I18n.getVocabulary().departement() + ":" + informationRecherche.getDepartement() + " ");
|
142 |
texteRecherchePrecedente.append(I18n.getVocabulary().departement() + ":" + informationRecherche.getDepartement() + " ");
|
- |
|
143 |
}
|
- |
|
144 |
if (informationRecherche.getCommune()!=null && !informationRecherche.getCommune().equals("")) {
|
- |
|
145 |
texteRecherchePrecedente.append(I18n.getVocabulary().commune() + ":" + informationRecherche.getCommune() + " ");
|
132 |
}
|
146 |
}
|
133 |
if (!informationRecherche.getFamille().equals("")) {
|
147 |
if (informationRecherche.getFamille()!=null && !informationRecherche.getFamille().equals("")) {
|
134 |
texteRecherchePrecedente.append(I18n.getVocabulary().famille() + ":" + informationRecherche.getFamille() + " ");
|
148 |
texteRecherchePrecedente.append(I18n.getVocabulary().famille() + ":" + informationRecherche.getFamille() + " ");
|
135 |
}
|
149 |
}
|
136 |
if (!informationRecherche.getGenre().equals("")) {
|
150 |
if (informationRecherche.getGenre()!=null && !informationRecherche.getGenre().equals("")) {
|
137 |
texteRecherchePrecedente.append(I18n.getVocabulary().genre() + ":" + informationRecherche.getGenre() + " ");
|
151 |
texteRecherchePrecedente.append(I18n.getVocabulary().genre() + ":" + informationRecherche.getGenre() + " ");
|
- |
|
152 |
}
|
- |
|
153 |
if (informationRecherche.getTag()!=null && !informationRecherche.getTag().equals("")) {
|
- |
|
154 |
texteRecherchePrecedente.append(I18n.getVocabulary().tag() + ":" + informationRecherche.getTag() + " ");
|
138 |
}
|
155 |
}
|
139 |
if (!informationRecherche.getMotClef().equals("")) {
|
156 |
if (informationRecherche.getMotClef()!=null && !informationRecherche.getMotClef().equals("")) {
|
140 |
texteRecherchePrecedente.append(I18n.getVocabulary().mot_clef() + ":" + informationRecherche.getMotClef() + " ");
|
157 |
texteRecherchePrecedente.append(I18n.getVocabulary().mot_clef() + ":" + informationRecherche.getMotClef() + " ");
|
- |
|
158 |
}
|
- |
|
159 |
if (informationRecherche.getAuteur()!=null && !informationRecherche.getAuteur().equals("")) {
|
- |
|
160 |
texteRecherchePrecedente.append(I18n.getVocabulary().auteur() + ":" + informationRecherche.getAuteur() + " ");
|
- |
|
161 |
}
|
- |
|
162 |
if (informationRecherche.getDate()!=null && !informationRecherche.getDate().equals("")) {
|
- |
|
163 |
texteRecherchePrecedente.append(I18n.getVocabulary().date() + ":" + informationRecherche.getDate() + " ");
|
- |
|
164 |
}
|
- |
|
165 |
|
- |
|
166 |
|
141 |
}
|
167 |
|
142 |
recherchePrecedente.setText(texteRecherchePrecedente.toString());
|
168 |
recherchePrecedente.setText(texteRecherchePrecedente.toString());
|
Line -... |
Line 169... |
- |
|
169 |
}
|
- |
|
170 |
|
- |
|
171 |
public void nettoyer() {
|
- |
|
172 |
chargerValeursRecherchePrecedente(new InformationsRecherche());
|
143 |
}
|
173 |
}
|
144 |
|
174 |
|
145 |
public HasText getRecherchePrincipale() {
|
175 |
public HasText getRecherchePrincipale() {
|
Line 146... |
Line 176... |
146 |
return recherchePrincipale;
|
176 |
return recherchePrincipale;
|