60 |
jpm |
1 |
package org.tela_botanica.client.vues;
|
|
|
2 |
|
|
|
3 |
import org.tela_botanica.client.RegistreId;
|
|
|
4 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
69 |
jpm |
5 |
import org.tela_botanica.client.modeles.StructureListe;
|
60 |
jpm |
6 |
|
|
|
7 |
import com.extjs.gxt.ui.client.Registry;
|
|
|
8 |
import com.extjs.gxt.ui.client.Style.LayoutRegion;
|
|
|
9 |
import com.extjs.gxt.ui.client.util.Margins;
|
|
|
10 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
|
|
11 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
|
|
|
12 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
|
156 |
jp_milcent |
13 |
import com.google.gwt.core.client.GWT;
|
60 |
jpm |
14 |
import com.google.gwt.user.client.Window;
|
|
|
15 |
|
|
|
16 |
public class StructureVue extends LayoutContainer implements Rafraichissable {
|
|
|
17 |
|
|
|
18 |
private StructureListePanneauVue panneauInstitutionListe;
|
|
|
19 |
private StructureDetailPanneauVue panneauInstitutionDetail;
|
|
|
20 |
|
|
|
21 |
public StructureVue() {
|
|
|
22 |
BorderLayout layout = new BorderLayout();
|
|
|
23 |
layout.setEnableState(false);
|
|
|
24 |
setLayout(layout);
|
|
|
25 |
|
|
|
26 |
panneauInstitutionListe = new StructureListePanneauVue();
|
|
|
27 |
this.add(panneauInstitutionListe, new BorderLayoutData(LayoutRegion.CENTER));
|
|
|
28 |
|
|
|
29 |
panneauInstitutionDetail = new StructureDetailPanneauVue();
|
|
|
30 |
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, .5f, 200, 1000);
|
|
|
31 |
southData.setSplit(true);
|
|
|
32 |
southData.setMargins(new Margins(5, 0, 0, 0));
|
|
|
33 |
this.add(panneauInstitutionDetail, southData);
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public void rafraichir(Object nouvelleDonnees) {
|
156 |
jp_milcent |
37 |
// Nous passons l'objet aux méthodes rafraichir des panneaux composant le panneau principal Structure
|
|
|
38 |
panneauInstitutionListe.rafraichir(nouvelleDonnees);
|
|
|
39 |
panneauInstitutionDetail.rafraichir(nouvelleDonnees);
|
|
|
40 |
// Mise à jour du panneau central
|
|
|
41 |
((LayoutContainer) Registry.get(RegistreId.PANNEAU_CENTRE)).layout();
|
60 |
jpm |
42 |
}
|
|
|
43 |
|
|
|
44 |
}
|