Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 4 Rev 10
Line 1... Line 1...
1
package org.tela_botanica.client;
1
package org.tela_botanica.client;
Line 2... Line 2...
2
 
2
 
3
import com.google.gwt.core.client.EntryPoint;
-
 
4
import com.google.gwt.i18n.client.Dictionary;
3
import com.google.gwt.core.client.EntryPoint;
5
import com.google.gwt.user.client.Window;
4
import com.google.gwt.user.client.Window;
6
import com.google.gwt.user.client.ui.DockPanel;
5
import com.google.gwt.user.client.ui.DockPanel;
Line 7... Line 6...
7
import com.google.gwt.user.client.ui.RootPanel;
6
import com.google.gwt.user.client.ui.RootPanel;
8
 
7
 
9
import org.tela_botanica.client.TopPanel;
8
import org.tela_botanica.client.TopPanel;
Line 10... Line 9...
10
import org.tela_botanica.client.CenterPanel;
9
import org.tela_botanica.client.CenterPanel;
11
import org.tela_botanica.client.Shortcuts;
10
import org.tela_botanica.client.LeftPanel;
12
 
11
 
13
 
12
 
Line -... Line 13...
-
 
13
 
14
 
14
/**
15
/**
15
 * Entry point classes define <code>onModuleLoad()</code>.
16
 * Entry point classes define <code>onModuleLoad()</code>.
16
 */
-
 
17
public class Cel implements EntryPoint {
-
 
18
 
17
 */
19
 
-
 
20
  
Line 18... Line 21...
18
public class Cel implements EntryPoint {
21
  private TopPanel topPanel = null;
19
 
22
  private CenterPanel centerPanel = null;
20
	
23
  private LeftPanel leftPanel = null;
21
  private TopPanel topPanel = new TopPanel();
24
 
Line -... Line 25...
-
 
25
  private Mediator mediator = null;
-
 
26
 
-
 
27
 
-
 
28
  /**
-
 
29
   * This is the entry point method.
-
 
30
   */
-
 
31
  public void onModuleLoad() {
-
 
32
 
-
 
33
 
-
 
34
	 mediator= new Mediator();
-
 
35
	 mediator.registerCel(this);
-
 
36
	 mediator.initUser();
-
 
37
		
-
 
38
		
-
 
39
  }
Line 22... Line 40...
22
  private CenterPanel centerPanel = new CenterPanel();
40
  
23
  private Shortcuts shortcuts = new Shortcuts();
41
  public void initAsync() {
Line 24... Line 42...
24
 
42
	  
Line 39... Line 57...
39
	  
57
	  
40
	  
58
	  
41
	  DockPanel outer = new DockPanel();
59
	  DockPanel outer = new DockPanel();
42
	  outer.add(topPanel, DockPanel.NORTH);
60
	  outer.add(topPanel, DockPanel.NORTH);
Line 43... Line 61...
43
	  outer.add(centerPanel, DockPanel.CENTER);
61
	  outer.add(centerPanel, DockPanel.CENTER);
44
	  outer.add(shortcuts, DockPanel.WEST);
62
	  outer.add(leftPanel, DockPanel.WEST);
45
	  
63
	  
Line 46... Line 64...
46
	  centerPanel.setWidth("100%");
64
	  centerPanel.setWidth("100%");
Line 47... Line 65...
47
	  // Shortcuts : 
65
	  // LeftPanel : 
Line 64... Line 82...
64
  
82
  
65
  
83
  
66
  public void onWindowResized(int width, int height) {
84
  public void onWindowResized(int width, int height) {
67
	    // Adjust the shortcut panel and detail area to take up the available room
85
	    // Adjust the shortcut panel and detail area to take up the available room
68
	    // in the window.
86
	    // in the window.
69
	    int shortcutHeight = height - shortcuts.getAbsoluteTop() - 8;
87
	    int shortcutHeight = height - leftPanel.getAbsoluteTop() - 8;
70
	    if (shortcutHeight < 1)
88
	    if (shortcutHeight < 1)
Line 71... Line 89...
71
	      shortcutHeight = 1;
89
	      shortcutHeight = 1;
Line 72... Line -...
72
	    shortcuts.setHeight("" + shortcutHeight);
-
 
73
 
-
 
74
  }
-
 
75
  
-
 
76
public String getServiceBaseUrl() {
-
 
Line 77... Line -...
77
	  
-
 
78
	  Dictionary theme = Dictionary.getDictionary("Parameters");
-
 
Line 79... Line 90...
79
	  return theme.get("serviceBaseUrl");
90
	    leftPanel.setHeight("" + shortcutHeight);