Subversion Repositories eFlore/Archives.cel-v1

Rev

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

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