Subversion Repositories eFlore/Applications.del

Rev

Rev 1079 | Rev 1214 | 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
1038 gduche 24
	Label nomRetenu, famille, auteur, localite, motsClefs, numNomenclatural, nomCommun, commentaire, milieu, station;
623 gduche 25
 
26
	@UiField
27
	HTML lieuDit;
1026 gduche 28
 
29
	@UiField
623 gduche 30
	InlineLabel dateReleve, dateTransmission;
31
 
32
	public MetadonneesEnLigneVue() {
33
		initWidget(binder.createAndBindUi(this));
34
	}
35
 
36
	public HasText getNomRetenu() {
37
		return this.nomRetenu;
38
	}
39
 
40
	public HasText getFamille() {
41
		return this.famille;
42
	}
43
 
44
	public HasText getAuteur() {
45
		return this.auteur;
46
	}
47
 
48
	public HasText getDateTransmission() {
49
		return this.dateTransmission;
50
	}
51
 
52
	public HasText getDateReleve() {
53
		return this.dateReleve;
54
	}
55
 
56
	public HasText getLocalite() {
57
		return this.localite;
58
	}
59
 
60
	public HasText getMotsClefs() {
61
		return this.motsClefs;
62
	}
63
 
64
	public HasText getNumNomenclatural() {
65
		return this.numNomenclatural;
66
	}
67
 
68
	public HasText getNomCommun() {
69
		return nomCommun;
70
	}
71
 
72
	public HasText getLieuDit() {
73
		return lieuDit;
74
	}
75
 
76
	public HasText getMilieu() {
77
		return milieu;
78
	}
79
 
80
	public HasText getCommentaire() {
81
		return commentaire;
82
	}
83
 
84
	@Override
85
	public HasClickHandlers getLienNomRetenu() {
86
		return nomRetenu;
87
	}
88
 
89
	public HasClickHandlers getLienFamille() {
90
		return this.famille;
91
	}
92
 
93
	public HasClickHandlers getLienAuteur() {
94
		return this.auteur;
95
	}
96
 
97
	public HasClickHandlers getLienDateTransmission() {
98
		return this.dateTransmission;
99
	}
100
 
101
	public HasClickHandlers getLienDateReleve() {
102
		return this.dateReleve;
103
	}
104
 
105
	public HasClickHandlers getLienLocalite() {
106
		return this.localite;
107
	}
108
 
109
	public HasClickHandlers getLienMotsClefs() {
110
		return this.motsClefs;
111
	}
112
 
113
	public HasClickHandlers getLienNumNomenclatural() {
114
		return this.numNomenclatural;
115
	}
116
 
117
	public HasClickHandlers getLienNomCommun() {
118
		return nomCommun;
119
	}
120
 
121
	public HasClickHandlers getLienMilieu() {
122
		return milieu;
123
	}
124
 
125
	public HasClickHandlers getLienCommentaire() {
126
		return commentaire;
127
	}
128
 
129
	@Override
130
	public void masquerChampsVides() {
131
		HasText[] champs = {nomRetenu, nomCommun, famille, localite, auteur,  motsClefs,  commentaire, milieu, lieuDit, dateReleve, dateTransmission};
132
		for (int i = 0; i < champs.length; i ++) {
133
			HasText champ = champs[i];
134
			if ("".equals(champ.getText())) {
135
				Widget widget = (Widget) champ;
136
				widget.getParent().setVisible(false);
137
			}
138
		}
139
	}
140
 
1026 gduche 141
	@Override
142
	public void setStation(String station) {
143
		if (station.equals("")) {
1104 gduche 144
			this.station.setVisible(false);
1026 gduche 145
		} else {
146
			this.station.setText(station);
147
		}
148
 
149
	}
1078 gduche 150
 
151
	@Override
152
	public void activerLiens() {
153
 
154
	}
1026 gduche 155
 
1079 gduche 156
	@Override
157
	public void activerLienAuteur() {
158
		auteur.addStyleName("labelLien");
159
	}
160
 
623 gduche 161
}