Subversion Repositories eFlore/Applications.del

Rev

Rev 623 | Rev 1038 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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