package welcome.client.ui.menu;
import welcome.client.ui.Content;
import welcome.client.ui.ContentContainer;
import welcome.client.ui.auth.AuthForm;
import welcome.client.ui.maps.MapsForm;
import welcome.client.ui.popup.PopupForm;
import welcome.client.ui.store.StoreForm;
import welcome.client.ui.store.StoreForm2;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.VerticalPanel;
public class Menu extends Content {
private VerticalPanel verticalPanel;
private MenuBar menuBar;
private MenuItem authentication;
private MenuItem fichier;
private MenuItem fermer;
private MenuItem popup;
private MenuItem sotre2Item;
private MenuItem mntmNewItem;
public Menu()
{
this.verticalPanel = new VerticalPanel();
initWidget(this.verticalPanel);
this.verticalPanel.setSize("100%", "37px");
this.menuBar = new MenuBar(false);
this.verticalPanel.add(this.menuBar);
this.menuBar.setWidth("100%");
MenuBar menuBar_1 = new MenuBar(true);
this.fichier = new MenuItem("Fichier", false, menuBar_1);
this.fermer = new MenuItem("Fermer", false, new Command() {
public void execute() {
}
});
this.fermer.setHTML("Fermer");
menuBar_1.addItem(this.fermer);
this.menuBar.addItem(this.fichier);
this.authentication = new MenuItem("Authentication", false, new Command() {
public void execute() {
}
});
this.authentication.setHTML("Authentication");
this.menuBar.addItem(this.authentication);
this.authentication.setCommand(new Command() {
@Override
public void execute() {
ContentContainer.setContent(new AuthForm(), "content");
}
});
this.sotre2Item = new MenuItem("New item", false, new Command() {
public void execute() {
ContentContainer.setContent(new StoreForm2(), "content");
}
});
this.sotre2Item.setHTML("Store");
this.menuBar.addItem(this.sotre2Item);
mntmNewItem = new MenuItem("New item", false, new Command() {
public void execute() {
ContentContainer.setContent(new MapsForm(), "content");
}
});
mntmNewItem.setHTML("Maps");
menuBar.addItem(mntmNewItem);
this.popup = new MenuItem("popup", false, new Command() {
public void execute() {
ContentContainer.setContent(new PopupForm(), "content");
}
});
this.menuBar.addItem(this.popup);
this.authentication.setCommand(new Command() {
@Override
public void execute() {
ContentContainer.setContent(new MapsForm(), "content");
}
});
}
}