Remove unused toolbar
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@112247 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3d306f24a8
commit
0cf68d06eb
|
@ -282,6 +282,12 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
@Source("help.png")
|
@Source("help.png")
|
||||||
ImageResource help();
|
ImageResource help();
|
||||||
|
|
||||||
|
@Source("information_32.png")
|
||||||
|
ImageResource information32();
|
||||||
|
|
||||||
|
@Source("information.png")
|
||||||
|
ImageResource information();
|
||||||
|
|
||||||
@Source("logs_32.png")
|
@Source("logs_32.png")
|
||||||
ImageResource logs32();
|
ImageResource logs32();
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 695 B |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -1,91 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.td.client.toolbar;
|
|
||||||
|
|
||||||
import com.google.gwt.dom.client.Element;
|
|
||||||
import com.google.gwt.dom.client.NodeList;
|
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
|
||||||
import com.sencha.gxt.core.client.dom.XElement;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class AnalysisToolBar {
|
|
||||||
|
|
||||||
protected ToolBar toolBar;
|
|
||||||
|
|
||||||
public AnalysisToolBar()
|
|
||||||
{
|
|
||||||
toolBar = new ToolBar();
|
|
||||||
build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ToolBar getToolBar()
|
|
||||||
{
|
|
||||||
return toolBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void build()
|
|
||||||
{
|
|
||||||
ButtonGroup group = new ButtonGroup();
|
|
||||||
group.setHeadingText("Chart");
|
|
||||||
toolBar.add(group);
|
|
||||||
|
|
||||||
FlexTable table = new FlexTable();
|
|
||||||
group.add(table);
|
|
||||||
/*
|
|
||||||
TextButton btn = new TextButton("Bar", TabularDataResources.INSTANCE.chartBar());
|
|
||||||
table.setWidget(0, 0, btn);
|
|
||||||
|
|
||||||
btn = new TextButton("Curve", TabularDataResources.INSTANCE.chartCurve());
|
|
||||||
table.setWidget(1, 0, btn);
|
|
||||||
|
|
||||||
btn = new TextButton("Pie", TabularDataResources.INSTANCE.chartPie());
|
|
||||||
table.setWidget(0, 2, btn);
|
|
||||||
|
|
||||||
btn = new TextButton("Bulls", TabularDataResources.INSTANCE.chartBullsEye());
|
|
||||||
table.setWidget(1, 2, btn);
|
|
||||||
|
|
||||||
cleanCells(table.getElement());
|
|
||||||
|
|
||||||
|
|
||||||
group = new ButtonGroup();
|
|
||||||
group.setHeadingText("External Tool");
|
|
||||||
toolBar.add(group);
|
|
||||||
|
|
||||||
table = new FlexTable();
|
|
||||||
group.add(table);
|
|
||||||
|
|
||||||
btn = new TextButton("R Studio", TabularDataResources.INSTANCE.rstudio());
|
|
||||||
table.setWidget(0, 0, btn);
|
|
||||||
|
|
||||||
btn = new TextButton("Statistical", TabularDataResources.INSTANCE.sm());
|
|
||||||
table.setWidget(1, 0, btn);
|
|
||||||
|
|
||||||
/*btn = new TextButton("Pie", TabularDataResources.INSTANCE.chartPie());
|
|
||||||
table.setWidget(0, 2, btn);
|
|
||||||
|
|
||||||
btn = new TextButton("Bulls", TabularDataResources.INSTANCE.chartBullsEye());
|
|
||||||
table.setWidget(1, 2, btn);*/
|
|
||||||
|
|
||||||
cleanCells(table.getElement());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void cleanCells(Element elem) {
|
|
||||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
|
||||||
for (int i = 0; i < tds.getLength(); i++) {
|
|
||||||
Element td = tds.getItem(i);
|
|
||||||
|
|
||||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
|
||||||
td.removeFromParent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,152 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.td.client.toolbar;
|
|
||||||
|
|
||||||
import com.google.gwt.dom.client.Element;
|
|
||||||
import com.google.gwt.dom.client.NodeList;
|
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
|
||||||
import com.sencha.gxt.core.client.dom.XElement;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class EditingToolBar {
|
|
||||||
|
|
||||||
protected EventBus eventBus;
|
|
||||||
protected ToolBar toolBar;
|
|
||||||
|
|
||||||
protected TextButton importButton;
|
|
||||||
protected TextButton importCSVButton;
|
|
||||||
protected TextButton importSDMXButton;
|
|
||||||
|
|
||||||
protected TextButton validationButton;
|
|
||||||
protected TextButton rulesButton;
|
|
||||||
|
|
||||||
protected TextButton exportButton;
|
|
||||||
protected TextButton exportCSVButton;
|
|
||||||
protected TextButton exportSDMXButton;
|
|
||||||
|
|
||||||
public EditingToolBar(EventBus eventBus)
|
|
||||||
{
|
|
||||||
this.eventBus = eventBus;
|
|
||||||
toolBar = new ToolBar();
|
|
||||||
build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ToolBar getToolBar()
|
|
||||||
{
|
|
||||||
return toolBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void build()
|
|
||||||
{
|
|
||||||
ButtonGroup importGroup = new ButtonGroup();
|
|
||||||
importGroup.setHeadingText("Import");
|
|
||||||
toolBar.add(importGroup);
|
|
||||||
|
|
||||||
FlexTable importLayout = new FlexTable();
|
|
||||||
importGroup.add(importLayout);
|
|
||||||
/*
|
|
||||||
importButton = new TextButton("Import", TabularDataResources.INSTANCE.importTD());
|
|
||||||
importButton.setScale(ButtonScale.LARGE);
|
|
||||||
importButton.setIconAlign(IconAlign.TOP);
|
|
||||||
importButton.setToolTip("Imports a new table");
|
|
||||||
importButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
importButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.NONE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
importLayout.setWidget(0, 0, importButton);
|
|
||||||
importLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
|
|
||||||
importCSVButton = new TextButton("CSV", TabularDataResources.INSTANCE.csv());
|
|
||||||
importCSVButton.setToolTip("Imports a new table from a CSV file");
|
|
||||||
importLayout.setWidget(0, 2, importCSVButton);
|
|
||||||
importCSVButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.CSV));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
importSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx());
|
|
||||||
importSDMXButton.setToolTip("Imports a new table from a SDMX registry");
|
|
||||||
importLayout.setWidget(1, 2, importSDMXButton);
|
|
||||||
importSDMXButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.SDMX));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
cleanCells(importLayout.getElement());
|
|
||||||
|
|
||||||
|
|
||||||
ButtonGroup validationGroup = new ButtonGroup();
|
|
||||||
validationGroup.setHeadingText("Validation");
|
|
||||||
toolBar.add(validationGroup);
|
|
||||||
|
|
||||||
FlexTable validationLayout = new FlexTable();
|
|
||||||
validationGroup.add(validationLayout);
|
|
||||||
|
|
||||||
|
|
||||||
validationButton = new TextButton("Validate", TabularDataResources.INSTANCE.validation());
|
|
||||||
validationLayout.setWidget(0, 0, validationButton);
|
|
||||||
|
|
||||||
rulesButton = new TextButton("Rules", TabularDataResources.INSTANCE.rules());
|
|
||||||
validationLayout.setWidget(1, 0, rulesButton);
|
|
||||||
|
|
||||||
cleanCells(validationLayout.getElement());
|
|
||||||
|
|
||||||
|
|
||||||
ButtonGroup exportGroup = new ButtonGroup();
|
|
||||||
exportGroup.setHeadingText("Export");
|
|
||||||
toolBar.add(exportGroup);
|
|
||||||
|
|
||||||
FlexTable exportLayout = new FlexTable();
|
|
||||||
exportGroup.add(exportLayout);
|
|
||||||
|
|
||||||
exportButton = new TextButton("Export", TabularDataResources.INSTANCE.exportTD());
|
|
||||||
exportButton.setScale(ButtonScale.LARGE);
|
|
||||||
exportButton.setIconAlign(IconAlign.TOP);
|
|
||||||
exportButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
|
|
||||||
exportLayout.setWidget(0, 0, exportButton);
|
|
||||||
exportLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
|
|
||||||
exportCSVButton = new TextButton("CSV", TabularDataResources.INSTANCE.csv());
|
|
||||||
exportLayout.setWidget(0, 2, exportCSVButton);
|
|
||||||
|
|
||||||
exportSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx());
|
|
||||||
exportLayout.setWidget(1, 2, exportSDMXButton);
|
|
||||||
|
|
||||||
cleanCells(exportLayout.getElement());
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void cleanCells(Element elem) {
|
|
||||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
|
||||||
for (int i = 0; i < tds.getLength(); i++) {
|
|
||||||
Element td = tds.getItem(i);
|
|
||||||
|
|
||||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
|
||||||
td.removeFromParent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.td.client.toolbar;
|
|
||||||
|
|
||||||
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 "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class TabularDataTooBar {
|
|
||||||
|
|
||||||
protected TabPanel container;
|
|
||||||
protected EditingToolBar editingToolBar;
|
|
||||||
protected AnalysisToolBar analysisToolBar;
|
|
||||||
|
|
||||||
public TabularDataTooBar(EventBus eventBus)
|
|
||||||
{
|
|
||||||
container = new TabPanel();
|
|
||||||
|
|
||||||
editingToolBar = new EditingToolBar(eventBus);
|
|
||||||
VerticalLayoutContainer con = new VerticalLayoutContainer();
|
|
||||||
con.add(editingToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
|
||||||
container.add(con, "Editing");
|
|
||||||
|
|
||||||
analysisToolBar = new AnalysisToolBar();
|
|
||||||
con = new VerticalLayoutContainer();
|
|
||||||
con.add(analysisToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
|
||||||
container.add(con, "Analysis");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the container
|
|
||||||
*/
|
|
||||||
public TabPanel getContainer() {
|
|
||||||
return container;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Binary file not shown.
After Width: | Height: | Size: 695 B |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue