| 623 |
gduche |
1 |
package org.tela_botanica.del.client.composants.metadonnees;
|
|
|
2 |
|
|
|
3 |
import com.google.gwt.core.client.GWT;
|
|
|
4 |
import com.google.gwt.event.dom.client.HasClickHandlers;
|
|
|
5 |
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
6 |
import com.google.gwt.uibinder.client.UiField;
|
|
|
7 |
import com.google.gwt.user.client.ui.Composite;
|
|
|
8 |
import com.google.gwt.user.client.ui.HTML;
|
|
|
9 |
import com.google.gwt.user.client.ui.HasText;
|
|
|
10 |
import com.google.gwt.user.client.ui.Hyperlink;
|
|
|
11 |
import com.google.gwt.user.client.ui.InlineLabel;
|
|
|
12 |
import com.google.gwt.user.client.ui.Label;
|
|
|
13 |
import com.google.gwt.user.client.ui.Widget;
|
|
|
14 |
|
|
|
15 |
public class MetadonneesEnLigneVue extends Composite implements MetadonneesPresenteur.Vue {
|
|
|
16 |
// Gestion d'UiBinder
|
|
|
17 |
interface Binder extends UiBinder<Widget, MetadonneesEnLigneVue> {
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
private static Binder binder = GWT.create(Binder.class);
|
|
|
21 |
|
|
|
22 |
@UiField
|
|
|
23 |
Hyperlink nomRetenu, famille, auteur, localite, motsClefs, numNomenclatural, nomCommun, commentaire, milieu;
|
|
|
24 |
|
|
|
25 |
@UiField
|
|
|
26 |
HTML lieuDit;
|
|
|
27 |
|
|
|
28 |
@UiField
|
|
|
29 |
InlineLabel dateReleve, dateTransmission;
|
|
|
30 |
|
|
|
31 |
public MetadonneesEnLigneVue() {
|
|
|
32 |
initWidget(binder.createAndBindUi(this));
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
public HasText getNomRetenu() {
|
|
|
36 |
return this.nomRetenu;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
public HasText getFamille() {
|
|
|
40 |
return this.famille;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
public HasText getAuteur() {
|
|
|
44 |
return this.auteur;
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
public HasText getDateTransmission() {
|
|
|
48 |
return this.dateTransmission;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
public HasText getDateReleve() {
|
|
|
52 |
return this.dateReleve;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
public HasText getLocalite() {
|
|
|
56 |
return this.localite;
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
public HasText getMotsClefs() {
|
|
|
60 |
return this.motsClefs;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public HasText getNumNomenclatural() {
|
|
|
64 |
return this.numNomenclatural;
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
public HasText getNomCommun() {
|
|
|
68 |
return nomCommun;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public HasText getLieuDit() {
|
|
|
72 |
return lieuDit;
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
public HasText getMilieu() {
|
|
|
76 |
return milieu;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
public HasText getCommentaire() {
|
|
|
80 |
return commentaire;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
@Override
|
|
|
84 |
public HasClickHandlers getLienNomRetenu() {
|
|
|
85 |
return nomRetenu;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public HasClickHandlers getLienFamille() {
|
|
|
89 |
return this.famille;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public HasClickHandlers getLienAuteur() {
|
|
|
93 |
return this.auteur;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public HasClickHandlers getLienDateTransmission() {
|
|
|
97 |
return this.dateTransmission;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public HasClickHandlers getLienDateReleve() {
|
|
|
101 |
return this.dateReleve;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public HasClickHandlers getLienLocalite() {
|
|
|
105 |
return this.localite;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public HasClickHandlers getLienMotsClefs() {
|
|
|
109 |
return this.motsClefs;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
public HasClickHandlers getLienNumNomenclatural() {
|
|
|
113 |
return this.numNomenclatural;
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
public HasClickHandlers getLienNomCommun() {
|
|
|
117 |
return nomCommun;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
public HasClickHandlers getLienMilieu() {
|
|
|
121 |
return milieu;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public HasClickHandlers getLienCommentaire() {
|
|
|
125 |
return commentaire;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
@Override
|
|
|
129 |
public void masquerChampsVides() {
|
|
|
130 |
HasText[] champs = {nomRetenu, nomCommun, famille, localite, auteur, motsClefs, commentaire, milieu, lieuDit, dateReleve, dateTransmission};
|
|
|
131 |
for (int i = 0; i < champs.length; i ++) {
|
|
|
132 |
HasText champ = champs[i];
|
|
|
133 |
if ("".equals(champ.getText())) {
|
|
|
134 |
Widget widget = (Widget) champ;
|
|
|
135 |
widget.getParent().setVisible(false);
|
|
|
136 |
}
|
|
|
137 |
}
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
}
|