18,14 → 18,8 |
|
package org.tela_botanica.client; |
|
|
import com.google.gwt.core.client.EntryPoint; |
import com.google.gwt.user.client.Command; |
import com.google.gwt.user.client.DeferredCommand; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.WindowResizeListener; |
import com.google.gwt.user.client.ui.DockPanel; |
import com.google.gwt.user.client.ui.RootPanel; |
import com.google.gwt.user.client.ui.VerticalPanel; |
|
|
|
32,127 → 26,22 |
/** |
* Entry point classes define <code>onModuleLoad()</code>. |
*/ |
public class Cel implements EntryPoint, WindowResizeListener { |
public class Cel implements EntryPoint { |
|
|
|
private TopPanel topPanel = null; // Identifiant de connexion et titre |
private CenterPanel centerPanel = null; // Liste de releves |
private LeftPanel leftPanel = null; // Filtres sur liste de releves |
private EntryPanel entryPanel = null; // Saisie d'un releve |
private ActionPanel actionPanel = null; // Action sur les relevés saisis |
private SearchPanel searchPanel = null; // Recherche dans les relevés saisis |
|
private VerticalPanel rightPanel = null; // Container panneau précedents (sauf left et popup) |
|
private Mediator mediator = null; // Intermediaire entre les differents classes |
|
|
/** |
* Point d'entree : recherche du pres-requis : information de connection. |
*/ |
|
public void onModuleLoad() { |
|
mediator= new Mediator(); |
mediator.registerCel(this); // Declaration point d'entree aupres de la classe intercesseur |
mediator.initUser(); // Initialisation environnement utilisateur (Cette methode appelle la methode initAsync() suivante) |
new Mediator(); |
|
} |
|
|
/** |
* Fin de l'initialisation |
* |
*/ |
|
public void initAsync() { |
|
|
centerPanel = new CenterPanel(mediator); // Liste de releves |
|
topPanel = new TopPanel(mediator); // Identifiant de connection |
|
leftPanel = new LeftPanel(mediator); // Filte de liste de releves |
|
|
entryPanel = new EntryPanel(mediator); // Formulaire de saisie |
|
actionPanel = new ActionPanel(mediator); // Action sur releves saisis |
searchPanel = new SearchPanel(mediator); // Recherche dans releves |
|
rightPanel = new VerticalPanel(); // Container des panneaux precedents |
|
entryPanel.setStyleName("item-Input"); |
|
|
// Assemblage des differents panneaux |
|
rightPanel.add(searchPanel); |
rightPanel.add(entryPanel); |
rightPanel.add(centerPanel); |
rightPanel.add(actionPanel); |
|
|
rightPanel.setWidth("100%"); |
centerPanel.setWidth("100%"); |
entryPanel.setWidth("100%"); |
topPanel.setWidth("100%"); |
|
rightPanel.setSpacing(2); |
|
// Disposition générale : |
|
DockPanel outer = new DockPanel(); |
outer.add(topPanel, DockPanel.NORTH); |
outer.add(rightPanel, DockPanel.CENTER); |
outer.add(leftPanel, DockPanel.WEST); |
|
outer.setWidth("100%"); |
|
outer.setSpacing(2); |
outer.setCellWidth(rightPanel, "100%"); |
|
// Window.enableScrolling(false); |
Window.setMargin("0px"); |
|
// Initialisation des differents contenus ... |
|
mediator.onInit(); |
|
RootPanel.get().add(outer); |
|
|
// Call the window resized handler to get the initial sizes setup. Doing |
// this in a deferred command causes it to occur after all widgets' sizes |
// have been computed by the browser. |
DeferredCommand.add(new Command() { |
public void execute() { |
onWindowResized(Window.getClientWidth(), Window.getClientHeight()); |
} |
}); |
|
|
} |
|
|
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 - leftPanel.getAbsoluteTop() - 8; |
if (shortcutHeight < 1) |
shortcutHeight = 1; |
leftPanel.setHeight("" + shortcutHeight); |
|
|
} |
|
|
|
|
} |
|
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log$ |
* Revision 1.10 2007-09-17 19:25:34 ddelon |
* Documentation |
* |
* |
*/ |