New file |
0,0 → 1,63 |
package org.tela_botanica.del.client.vues.entete; |
|
import org.tela_botanica.del.client.composants.formulaires.identification.FormulaireIdentificationPresenteur; |
import org.tela_botanica.del.client.composants.formulaires.identification.FormulaireIdentificationVue; |
import org.tela_botanica.del.client.composants.partageurl.PartageUrlPresenteur; |
import org.tela_botanica.del.client.composants.partageurl.PartageUrlVue; |
import org.tela_botanica.del.client.composants.presenteur.Presenteur; |
import org.tela_botanica.del.client.services.rest.UtilisateurServiceConcret; |
import org.tela_botanica.del.client.vues.entete.chapeaux.ChapeauPresenteur; |
import org.tela_botanica.del.client.vues.entete.chapeaux.ChapeauVue; |
import org.tela_botanica.del.client.vues.entete.liens.LiensPresenteur; |
import org.tela_botanica.del.client.vues.entete.liens.LiensVue; |
|
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
import com.google.gwt.user.client.ui.Widget; |
|
/** |
* Classe pour le header de l'application affichant le formulaire de connexion, le titre, les logos |
* */ |
public class EntetePresenteur extends Presenteur { |
|
/** |
* La vue du header |
* */ |
public interface Vue extends IsWidget { |
public HasWidgets getZoneIdentification(); |
public HasWidgets getZoneLiens(); |
public HasWidgets getZoneChapeau(); |
} |
|
private Vue vue; |
|
public EntetePresenteur(Vue vue) { |
this.vue = vue; |
} |
|
@Override |
public void go(HasWidgets composite) { |
composite.add(vue.asWidget()); |
|
//Ajout de la zone identification |
FormulaireIdentificationPresenteur identification = new FormulaireIdentificationPresenteur(new FormulaireIdentificationVue(), new UtilisateurServiceConcret()); |
identification.go(vue.getZoneIdentification()); |
|
ChapeauPresenteur chapeau = new ChapeauPresenteur(new ChapeauVue()); |
chapeau.go(vue.getZoneChapeau()); |
|
LiensPresenteur liens = new LiensPresenteur(new LiensVue()); |
liens.go(vue.getZoneLiens()); |
} |
|
@Override |
protected void gererEvenements() { |
// TODO Auto-generated method stub |
|
} |
|
public void ajouterLien(Widget lien) { |
this.vue.getZoneLiens().add(lien); |
} |
|
} |