tabular-data-manager/src/main/java/org/gcube/portlets/user/td/client/ribbon/TabularDataRibbon.java

65 lines
1.7 KiB
Java

/**
*
*/
package org.gcube.portlets.user.td.client.ribbon;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.widget.core.client.TabPanel;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
*/
public class TabularDataRibbon {
protected TabPanel ribbon;
protected FileToolBar fileToolBar;
protected ReviewToolBar reviewToolBar;
protected FormulasToolBar formulasToolBar;
protected ChartsToolBar chartsToolBar;
public TabularDataRibbon(EventBus eventBus)
{
ribbon = new TabPanel();
ribbon.setId("Ribbon");
ribbon.setStyleName("ribbon");
fileToolBar = new FileToolBar(eventBus);
VerticalLayoutContainer con = new VerticalLayoutContainer();
con.setHeight("94px");
con.add(fileToolBar.getToolBar(), new VerticalLayoutData(1, -1));
ribbon.add(con, "Home");
reviewToolBar = new ReviewToolBar(eventBus);
con = new VerticalLayoutContainer();
con.setHeight("94px");
con.add(reviewToolBar.getToolBar(), new VerticalLayoutData(1, -1));
ribbon.add(con, "Review");
formulasToolBar = new FormulasToolBar(eventBus);
con = new VerticalLayoutContainer();
con.setHeight("94px");
con.add(formulasToolBar.getToolBar(), new VerticalLayoutData(1, -1));
ribbon.add(con, "Modify");
chartsToolBar = new ChartsToolBar(eventBus);
con = new VerticalLayoutContainer();
con.setHeight("94px");
con.add(chartsToolBar.getToolBar(), new VerticalLayoutData(1, -1));
ribbon.add(con, "Applications");
}
/**
* @return the container
*/
public TabPanel getContainer() {
return ribbon;
}
}