Rev 1026 | Rev 1079 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.del.client.composants.metadonnees;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;
public class MetadonneesEnLigneVue extends Composite implements MetadonneesPresenteur.Vue {
// Gestion d'UiBinder
interface Binder extends UiBinder<Widget, MetadonneesEnLigneVue> {
}
private static Binder binder = GWT.create(Binder.class);
@UiField
Label nomRetenu, famille, auteur, localite, motsClefs, numNomenclatural, nomCommun, commentaire, milieu, station;
@UiField
HTML lieuDit;
@UiField
Panel zoneStation;
@UiField
InlineLabel dateReleve, dateTransmission;
public MetadonneesEnLigneVue() {
initWidget(binder.createAndBindUi(this));
}
public HasText getNomRetenu() {
return this.nomRetenu;
}
public HasText getFamille() {
return this.famille;
}
public HasText getAuteur() {
return this.auteur;
}
public HasText getDateTransmission() {
return this.dateTransmission;
}
public HasText getDateReleve() {
return this.dateReleve;
}
public HasText getLocalite() {
return this.localite;
}
public HasText getMotsClefs() {
return this.motsClefs;
}
public HasText getNumNomenclatural() {
return this.numNomenclatural;
}
public HasText getNomCommun() {
return nomCommun;
}
public HasText getLieuDit() {
return lieuDit;
}
public HasText getMilieu() {
return milieu;
}
public HasText getCommentaire() {
return commentaire;
}
@Override
public HasClickHandlers getLienNomRetenu() {
return nomRetenu;
}
public HasClickHandlers getLienFamille() {
return this.famille;
}
public HasClickHandlers getLienAuteur() {
return this.auteur;
}
public HasClickHandlers getLienDateTransmission() {
return this.dateTransmission;
}
public HasClickHandlers getLienDateReleve() {
return this.dateReleve;
}
public HasClickHandlers getLienLocalite() {
return this.localite;
}
public HasClickHandlers getLienMotsClefs() {
return this.motsClefs;
}
public HasClickHandlers getLienNumNomenclatural() {
return this.numNomenclatural;
}
public HasClickHandlers getLienNomCommun() {
return nomCommun;
}
public HasClickHandlers getLienMilieu() {
return milieu;
}
public HasClickHandlers getLienCommentaire() {
return commentaire;
}
@Override
public void masquerChampsVides() {
HasText[] champs = {nomRetenu, nomCommun, famille, localite, auteur, motsClefs, commentaire, milieu, lieuDit, dateReleve, dateTransmission};
for (int i = 0; i < champs.length; i ++) {
HasText champ = champs[i];
if ("".equals(champ.getText())) {
Widget widget = (Widget) champ;
widget.getParent().setVisible(false);
}
}
}
@Override
public void setStation(String station) {
if (station.equals("")) {
this.zoneStation.setVisible(false);
} else {
this.station.setText(station);
}
}
}