Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 10 Rev 11
1
package org.tela_botanica.client;
1
package org.tela_botanica.client;
2
 
2
 
3
import com.google.gwt.user.client.ui.Composite;
3
import com.google.gwt.user.client.ui.Composite;
4
import com.google.gwt.user.client.ui.DockPanel;
-
 
5
import com.google.gwt.user.client.ui.HTML;
-
 
6
import com.google.gwt.user.client.ui.VerticalPanel;
4
import com.google.gwt.user.client.ui.VerticalPanel;
7
 
5
 
8
 
6
 
9
import org.tela_botanica.client.TaxonList;
-
 
10
import org.tela_botanica.client.NameAssistant;
7
import org.tela_botanica.client.InventoryItemList;
11
 
8
 
12
/**
9
/**
13
 * Composite permet de wrapper des Widgett pour creer un nouveau Widget cf methode initWidget()
10
 * Composite permet de wrapper des Widgett pour creer un nouveau Widget cf methode initWidget()
14
 */
11
 */
15
 
12
 
16
public class CenterPanel extends Composite {
13
public class CenterPanel extends Composite {
17
 
14
 
18
	
15
	
19
  private TaxonList taxonList = null;
-
 
20
  private NameAssistant nameAssistant = null;
-
 
21
  private LocationAssistant locationAssistant = null;
-
 
22
 
16
  private InventoryItemList inventoryItemList = null;
23
 
17
 
24
  public CenterPanel(Mediator mediator) {
18
  public CenterPanel(Mediator mediator) {
25
 
19
 
26
	
20
	
27
	taxonList = new TaxonList(mediator);
-
 
28
	
-
 
29
	nameAssistant = new NameAssistant(taxonList);
-
 
30
	locationAssistant = new LocationAssistant(taxonList);
-
 
31
 
-
 
32
	  
-
 
33
	taxonList.setNameProvider(nameAssistant);
-
 
34
	taxonList.setLocationProvider(locationAssistant);
21
	inventoryItemList = new InventoryItemList(mediator);
35
	  
-
 
36
    VerticalPanel outer = new VerticalPanel();
-
 
37
    DockPanel inner = new DockPanel();
-
 
38
   
-
 
39
    DockPanel namePanel = new DockPanel();
-
 
40
    DockPanel locationPanel = new DockPanel();
-
 
41
    
-
 
42
 
-
 
43
     namePanel.add(new HTML("Nom: "),DockPanel.WEST);
-
 
44
     namePanel.add (nameAssistant,DockPanel.CENTER);
-
 
45
	 
-
 
46
	 nameAssistant.setWidth("100%");
-
 
47
	 namePanel.setCellWidth(nameAssistant,"100%");
-
 
48
	 namePanel.setWidth("100%");
-
 
49
	 
-
 
50
     locationPanel.add(new HTML("Lieu: "),DockPanel.WEST);
-
 
51
     locationPanel.add (locationAssistant,DockPanel.CENTER);
-
 
52
	 
-
 
53
	 locationAssistant.setWidth("100%");
-
 
54
	 locationPanel.setCellWidth(locationAssistant,"100%");
-
 
55
	 locationPanel.setWidth("100%");
-
 
56
	 
-
 
57
	 inner.add(namePanel,DockPanel.WEST);
-
 
58
	 inner.add(locationPanel,DockPanel.CENTER);
-
 
59
	 
-
 
60
	 inner.setCellWidth(namePanel,"50%");
-
 
61
	 inner.setCellWidth(locationPanel,"50%");
-
 
62
 
22
 
63
	 
-
 
64
	 outer.add(inner);
23
    VerticalPanel outer = new VerticalPanel();
65
	 outer.add(taxonList);
24
	 
66
	 inner.setWidth("100%");
25
	 outer.add(inventoryItemList);
67
	 taxonList.setWidth("100%");
26
	 inventoryItemList.setWidth("100%");
68
 
27
 
69
     initWidget(outer);
28
     initWidget(outer);
70
  }
29
  }
71
  
30
  
72
  
31
  
73
  
32
  
74
}
33
}
75
 
34