Subversion Repositories eFlore/Archives.cel-v1

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 ddelon 1
package org.tela_botanica.client;
2
 
3
import com.google.gwt.core.client.EntryPoint;
4
import com.google.gwt.user.client.Window;
5
import com.google.gwt.user.client.ui.DockPanel;
6
import com.google.gwt.user.client.ui.RootPanel;
7
 
8
import org.tela_botanica.client.TopPanel;
9
import org.tela_botanica.client.CenterPanel;
10
import org.tela_botanica.client.Shortcuts;
11
 
12
 
13
 
14
/**
15
 * Entry point classes define <code>onModuleLoad()</code>.
16
 */
17
public class Cel implements EntryPoint {
18
 
19
 
20
  private TopPanel topPanel = new TopPanel();
21
  private CenterPanel centerPanel = new CenterPanel();
22
  private Shortcuts shortcuts = new Shortcuts();
23
 
24
  /**
25
   * This is the entry point method.
26
   */
27
  public void onModuleLoad() {
28
 
29
 
30
	  // Information haut de page (nom application, connexion ... etc).
31
	  // A regler
32
 
33
	  topPanel.setWidth("100%");
34
 
35
 
36
	  // DockPanel permet d'arranger plusieurs panneaux au coins cardinaux, le panneau central remplissant
37
	  // l'espace laissé.
38
 
39
 
40
	  DockPanel outer = new DockPanel();
41
	  outer.add(topPanel, DockPanel.NORTH);
42
	  outer.add(centerPanel, DockPanel.CENTER);
43
	  outer.add(shortcuts, DockPanel.WEST);
44
 
45
	  centerPanel.setWidth("100%");
46
	  // Shortcuts :
47
	  // Pour l'instant : relevés.
48
 
49
	  outer.setWidth("100%");
50
 
51
	  outer.setSpacing(4);
52
	  outer.setCellWidth(centerPanel, "100%");
53
 
54
//	  Window.enableScrolling(false);
55
	  Window.setMargin("0px");
56
 
57
	  // Finally, add the outer panel to the RootPanel, so that it will be
58
	  // displayed.
59
	  RootPanel.get().add(outer);
60
 
61
 
62
  }
63
 
64
 
65
  public void onWindowResized(int width, int height) {
66
	    // Adjust the shortcut panel and detail area to take up the available room
67
	    // in the window.
68
	    int shortcutHeight = height - shortcuts.getAbsoluteTop() - 8;
69
	    if (shortcutHeight < 1)
70
	      shortcutHeight = 1;
71
	    shortcuts.setHeight("" + shortcutHeight);
72
 
73
  }
74
}