Subversion Repositories eFlore/Applications.del

Rev

Rev 564 | Rev 1038 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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