| 127 | 
           gduche | 
           1 | 
           package org.tela_botanica.client.vues;
  | 
        
        
            | 
            | 
           2 | 
              | 
        
        
            | 
            | 
           3 | 
           import org.tela_botanica.client.RegistreId;
  | 
        
        
            | 
            | 
           4 | 
           import org.tela_botanica.client.interfaces.Rafraichissable;
  | 
        
        
            | 
            | 
           5 | 
           import org.tela_botanica.client.modeles.PersonneListe;
  | 
        
        
            | 
            | 
           6 | 
           import org.tela_botanica.client.modeles.StructureListe;
  | 
        
        
            | 
            | 
           7 | 
              | 
        
        
            | 
            | 
           8 | 
           import com.extjs.gxt.ui.client.Registry;
  | 
        
        
            | 
            | 
           9 | 
           import com.extjs.gxt.ui.client.Style.LayoutRegion;
  | 
        
        
            | 
            | 
           10 | 
           import com.extjs.gxt.ui.client.util.Margins;
  | 
        
        
            | 
            | 
           11 | 
           import com.extjs.gxt.ui.client.widget.LayoutContainer;
  | 
        
        
            | 
            | 
           12 | 
           import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
  | 
        
        
            | 
            | 
           13 | 
           import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
  | 
        
        
            | 
            | 
           14 | 
           import com.google.gwt.user.client.Window;
  | 
        
        
            | 
            | 
           15 | 
              | 
        
        
            | 
            | 
           16 | 
           public class PersonneVue extends LayoutContainer implements Rafraichissable {
  | 
        
        
            | 
            | 
           17 | 
              | 
        
        
            | 
            | 
           18 | 
           	private PanneauPersonneListe panneauPersonneListe;
  | 
        
        
            | 
            | 
           19 | 
           	private StructureDetailPanneauVue panneauInstitutionDetail;
  | 
        
        
            | 
            | 
           20 | 
              | 
        
        
            | 
            | 
           21 | 
           	public PersonneVue() {
  | 
        
        
            | 
            | 
           22 | 
           		BorderLayout layout = new BorderLayout();
  | 
        
        
            | 
            | 
           23 | 
           		layout.setEnableState(false);
  | 
        
        
            | 
            | 
           24 | 
           		setLayout(layout);
  | 
        
        
            | 
            | 
           25 | 
              | 
        
        
            | 
            | 
           26 | 
           		panneauPersonneListe = new PanneauPersonneListe();
  | 
        
        
            | 
            | 
           27 | 
           		this.add(panneauPersonneListe, new BorderLayoutData(LayoutRegion.CENTER));
  | 
        
        
            | 
            | 
           28 | 
              | 
        
        
            | 
            | 
           29 | 
           		//TODO : ajouter le détail des personnes
  | 
        
        
            | 
            | 
           30 | 
           		/*panneauInstitutionDetail = new StructureDetailPanneauVue();
  | 
        
        
            | 
            | 
           31 | 
           		BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, .5f, 200, 1000);
  | 
        
        
            | 
            | 
           32 | 
           		southData.setSplit(true);
  | 
        
        
            | 
            | 
           33 | 
           		southData.setMargins(new Margins(5, 0, 0, 0));
  | 
        
        
            | 
            | 
           34 | 
           		this.add(panneauInstitutionDetail, southData);*/
  | 
        
        
            | 
            | 
           35 | 
           	}
  | 
        
        
            | 
            | 
           36 | 
              | 
        
        
            | 
            | 
           37 | 
           	public void rafraichir(Object nouvelleDonnees) {
  | 
        
        
            | 
            | 
           38 | 
           		if (nouvelleDonnees instanceof PersonneListe) {
  | 
        
        
            | 
            | 
           39 | 
           			remplirListe((PersonneListe) nouvelleDonnees);
  | 
        
        
            | 
            | 
           40 | 
           		} else {
  | 
        
        
            | 
            | 
           41 | 
           			Window.alert("Problème!");
  | 
        
        
            | 
            | 
           42 | 
           		}
  | 
        
        
            | 
            | 
           43 | 
           	}
  | 
        
        
            | 
            | 
           44 | 
              | 
        
        
            | 
            | 
           45 | 
           	private void remplirListe(PersonneListe listeInstitutions) {
  | 
        
        
            | 
            | 
           46 | 
              | 
        
        
            | 
            | 
           47 | 
           		LayoutContainer panneauCentre = (LayoutContainer) Registry.get(RegistreId.PANNEAU_CENTRE);
  | 
        
        
            | 
            | 
           48 | 
           		panneauPersonneListe.rafraichir(listeInstitutions);
  | 
        
        
            | 
            | 
           49 | 
           		//panneauInstitutionDetail.rafraichir(listeInstitutions);*/
  | 
        
        
            | 
            | 
           50 | 
           		panneauCentre.layout();
  | 
        
        
            | 
            | 
           51 | 
           	}
  | 
        
        
            | 
            | 
           52 | 
              | 
        
        
            | 
            | 
           53 | 
           }
  |