Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 26 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26 Rev 28
Line 16... Line 16...
16
 * 
16
 * 
17
 */
17
 */
Line 18... Line 18...
18
 
18
 
Line -... Line 19...
-
 
19
package org.tela_botanica.client;
19
package org.tela_botanica.client;
20
 
20
 
-
 
21
import com.google.gwt.core.client.EntryPoint;
-
 
22
import com.google.gwt.user.client.Command;
-
 
23
import com.google.gwt.user.client.DeferredCommand;
-
 
24
import com.google.gwt.user.client.Window;
-
 
25
import com.google.gwt.user.client.WindowResizeListener;
-
 
26
import com.google.gwt.user.client.ui.DockPanel;
-
 
Line 27... Line 21...
27
import com.google.gwt.user.client.ui.RootPanel;
21
 
28
import com.google.gwt.user.client.ui.VerticalPanel;
22
import com.google.gwt.core.client.EntryPoint;
29
 
23
 
30
 
24
 
31
 
-
 
32
/**
-
 
33
 * Entry point classes define <code>onModuleLoad()</code>.
-
 
34
 */
-
 
35
public class Cel implements EntryPoint,  WindowResizeListener {
-
 
36
 
-
 
37
		
-
 
38
	
-
 
39
  private TopPanel topPanel = null;   // Identifiant de connexion et titre
-
 
40
  private CenterPanel centerPanel = null;  // Liste de releves
-
 
41
  private LeftPanel leftPanel = null; // Filtres sur liste de releves
-
 
42
  private EntryPanel entryPanel = null; // Saisie d'un releve
-
 
43
  private ActionPanel actionPanel = null; // Action sur les relevés saisis
-
 
Line 44... Line -...
44
  private SearchPanel searchPanel = null; // Recherche dans les relevés saisis
-
 
45
  
-
 
46
  private VerticalPanel rightPanel = null; // Container panneau précedents (sauf left et popup)
-
 
47
  
-
 
Line 48... Line 25...
48
  private Mediator mediator = null; // Intermediaire entre les differents classes
25
 
Line 49... Line 26...
49
 
26
/**
50
 
-
 
51
  /**
-
 
52
   * Point d'entree : recherche du pres-requis : information de connection.
-
 
53
   */
-
 
54
  
-
 
55
  public void onModuleLoad() {
-
 
56
 
-
 
57
	 mediator= new Mediator();
-
 
58
	 mediator.registerCel(this); // Declaration point d'entree aupres de la classe intercesseur
-
 
59
	 mediator.initUser(); // Initialisation environnement utilisateur (Cette methode appelle la methode initAsync() suivante)
-
 
60
	 
-
 
61
  }
-
 
62
  
-
 
63
  
-
 
64
  /**
-
 
65
   *  Fin de l'initialisation
-
 
66
   * 
-
 
67
   */
-
 
68
  
-
 
69
  public void initAsync() {
-
 
70
	  
-
 
71
 
-
 
72
	  centerPanel = new CenterPanel(mediator); // Liste de releves 
-
 
73
	 
-
 
74
	  topPanel = new TopPanel(mediator); // Identifiant de connection
-
 
75
	  
-
 
76
	  leftPanel = new LeftPanel(mediator); // Filte de liste de releves
-
 
77
	  
-
 
78
 
-
 
79
	  entryPanel = new EntryPanel(mediator); // Formulaire de saisie
-
 
80
	  
-
 
81
	  actionPanel = new ActionPanel(mediator); // Action sur releves saisis
-
 
82
	  searchPanel = new SearchPanel(mediator); // Recherche dans releves
-
 
83
	  
-
 
84
	  rightPanel = new VerticalPanel();  // Container des panneaux precedents
-
 
85
	  
-
 
86
	  entryPanel.setStyleName("item-Input");
-
 
87
 
-
 
88
	  
-
 
89
	  // Assemblage des differents panneaux 
-
 
90
	  
-
 
91
	  rightPanel.add(searchPanel);
-
 
92
	  rightPanel.add(entryPanel);
-
 
93
	  rightPanel.add(centerPanel);
-
 
94
	  rightPanel.add(actionPanel);
-
 
95
	  
-
 
96
	  
-
 
97
	  rightPanel.setWidth("100%");
-
 
98
	  centerPanel.setWidth("100%");
-
 
99
	  entryPanel.setWidth("100%");
-
 
100
	  topPanel.setWidth("100%");
-
 
101
 
-
 
102
	  rightPanel.setSpacing(2);
-
 
103
	  
-
 
104
	 // Disposition générale :
-
 
105
	  
-
 
106
	  DockPanel outer = new DockPanel();
-
 
107
	  outer.add(topPanel, DockPanel.NORTH);
-
 
108
	  outer.add(rightPanel, DockPanel.CENTER);
-
 
109
	  outer.add(leftPanel, DockPanel.WEST);
-
 
110
	  
-
 
111
	  outer.setWidth("100%");
-
 
112
 
-
 
113
	  outer.setSpacing(2);
-
 
114
	  outer.setCellWidth(rightPanel, "100%");
-
 
115
	 
-
 
116
//	  Window.enableScrolling(false);
-
 
117
	  Window.setMargin("0px");
-
 
118
 
-
 
119
//    Initialisation des differents contenus ...	  
-
 
120
	  
-
 
121
	  mediator.onInit();
-
 
122
	  
-
 
123
	  RootPanel.get().add(outer);
-
 
124
 
-
 
125
	  
-
 
126
	    // Call the window resized handler to get the initial sizes setup. Doing
-
 
Line 127... Line 27...
127
	    // this in a deferred command causes it to occur after all widgets' sizes
27
 * Entry point classes define <code>onModuleLoad()</code>.
Line 128... Line -...
128
	    // have been computed by the browser.
-
 
129
	    DeferredCommand.add(new Command() {
-
 
130
	      public void execute() {
-
 
131
	        onWindowResized(Window.getClientWidth(), Window.getClientHeight());
-
 
132
	      }
-
 
133
	    });
-
 
134
 
-
 
135
 
-
 
136
  }
-
 
137
  
-
 
138
  
-
 
139
  public void onWindowResized(int width, int height) {
-
 
140
	    // Adjust the shortcut panel and detail area to take up the available room
-
 
141
	    // in the window.
-
 
Line 142... Line 28...
142
	    int shortcutHeight = height - leftPanel.getAbsoluteTop() - 8;
28
 */
Line 143... Line 29...
143
	    if (shortcutHeight < 1)
29
public class Cel implements EntryPoint {
144
	      shortcutHeight = 1;
30
 
-
 
31
  
-
 
32
  public void onModuleLoad() {
-
 
33
 
145
	    leftPanel.setHeight("" + shortcutHeight);
34
	 new Mediator();
146
 
35