1,7 → 1,6 |
package org.tela_botanica.client; |
|
import com.google.gwt.core.client.EntryPoint; |
import com.google.gwt.i18n.client.Dictionary; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.DockPanel; |
import com.google.gwt.user.client.ui.RootPanel; |
8,7 → 7,7 |
|
import org.tela_botanica.client.TopPanel; |
import org.tela_botanica.client.CenterPanel; |
import org.tela_botanica.client.Shortcuts; |
import org.tela_botanica.client.LeftPanel; |
|
|
|
18,10 → 17,14 |
public class Cel implements EntryPoint { |
|
|
private TopPanel topPanel = new TopPanel(); |
private CenterPanel centerPanel = new CenterPanel(); |
private Shortcuts shortcuts = new Shortcuts(); |
|
private TopPanel topPanel = null; |
private CenterPanel centerPanel = null; |
private LeftPanel leftPanel = null; |
|
private Mediator mediator = null; |
|
|
/** |
* This is the entry point method. |
*/ |
28,6 → 31,21 |
public void onModuleLoad() { |
|
|
mediator= new Mediator(); |
mediator.registerCel(this); |
mediator.initUser(); |
|
|
} |
|
public void initAsync() { |
|
|
topPanel = new TopPanel(); |
centerPanel = new CenterPanel(mediator); |
leftPanel = new LeftPanel(mediator); |
|
|
// Information haut de page (nom application, connexion ... etc). |
// A regler |
|
41,10 → 59,10 |
DockPanel outer = new DockPanel(); |
outer.add(topPanel, DockPanel.NORTH); |
outer.add(centerPanel, DockPanel.CENTER); |
outer.add(shortcuts, DockPanel.WEST); |
outer.add(leftPanel, DockPanel.WEST); |
|
centerPanel.setWidth("100%"); |
// Shortcuts : |
// LeftPanel : |
// Pour l'instant : relevés. |
|
outer.setWidth("100%"); |
66,20 → 84,13 |
public void onWindowResized(int width, int height) { |
// Adjust the shortcut panel and detail area to take up the available room |
// in the window. |
int shortcutHeight = height - shortcuts.getAbsoluteTop() - 8; |
int shortcutHeight = height - leftPanel.getAbsoluteTop() - 8; |
if (shortcutHeight < 1) |
shortcutHeight = 1; |
shortcuts.setHeight("" + shortcutHeight); |
leftPanel.setHeight("" + shortcutHeight); |
|
} |
|
public String getServiceBaseUrl() { |
|
Dictionary theme = Dictionary.getDictionary("Parameters"); |
return theme.get("serviceBaseUrl"); |
|
|
} |
|
|
} |