Blame | Last modification | View Log | RSS feed
package org.tela_botanica.client;import com.google.gwt.core.client.EntryPoint;import com.google.gwt.user.client.Window;import com.google.gwt.user.client.ui.DockPanel;import com.google.gwt.user.client.ui.RootPanel;import org.tela_botanica.client.TopPanel;import org.tela_botanica.client.CenterPanel;import org.tela_botanica.client.Shortcuts;/*** Entry point classes define <code>onModuleLoad()</code>.*/public class Cel implements EntryPoint {private TopPanel topPanel = new TopPanel();private CenterPanel centerPanel = new CenterPanel();private Shortcuts shortcuts = new Shortcuts();/*** This is the entry point method.*/public void onModuleLoad() {// Information haut de page (nom application, connexion ... etc).// A reglertopPanel.setWidth("100%");// DockPanel permet d'arranger plusieurs panneaux au coins cardinaux, le panneau central remplissant// l'espace laissé.DockPanel outer = new DockPanel();outer.add(topPanel, DockPanel.NORTH);outer.add(centerPanel, DockPanel.CENTER);outer.add(shortcuts, DockPanel.WEST);centerPanel.setWidth("100%");// Shortcuts :// Pour l'instant : relevés.outer.setWidth("100%");outer.setSpacing(4);outer.setCellWidth(centerPanel, "100%");// Window.enableScrolling(false);Window.setMargin("0px");// Finally, add the outer panel to the RootPanel, so that it will be// displayed.RootPanel.get().add(outer);}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;if (shortcutHeight < 1)shortcutHeight = 1;shortcuts.setHeight("" + shortcutHeight);}}