Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@111930 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7564406a90
commit
2ffb25d575
|
@ -88,7 +88,6 @@ import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderL
|
||||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
||||||
|
|
||||||
//import org.gcube.portlets.user.tdtemplate.client.TdTemplateController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -97,10 +96,8 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TabularDataController {
|
public class TabularDataController {
|
||||||
// implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
|
||||||
|
|
||||||
private SimpleEventBus eventBus;
|
private SimpleEventBus eventBus;
|
||||||
// private TabularDataX tabularData;
|
|
||||||
private MainBoxPanel mainBoxPanel;
|
private MainBoxPanel mainBoxPanel;
|
||||||
private UIStateType uiState = UIStateType.START;
|
private UIStateType uiState = UIStateType.START;
|
||||||
|
|
||||||
|
@ -123,8 +120,6 @@ public class TabularDataController {
|
||||||
/**
|
/**
|
||||||
* Grid TableId
|
* Grid TableId
|
||||||
*/
|
*/
|
||||||
// private TableId tableOpening;
|
|
||||||
|
|
||||||
private TRId openTRIdAfterServerUpdate;
|
private TRId openTRIdAfterServerUpdate;
|
||||||
|
|
||||||
public TabularDataController() {
|
public TabularDataController() {
|
||||||
|
@ -151,10 +146,7 @@ public class TabularDataController {
|
||||||
return eventBus;
|
return eventBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* public void setTabularData(TabularDataX tabularData) { this.tabularData =
|
|
||||||
* tabularData; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
public ContentPanel getToolBoxPanel() {
|
public ContentPanel getToolBoxPanel() {
|
||||||
return toolBoxPanel;
|
return toolBoxPanel;
|
||||||
|
@ -867,6 +859,9 @@ public class TabularDataController {
|
||||||
case GEOSPATIAL_OCEAN_AREA:
|
case GEOSPATIAL_OCEAN_AREA:
|
||||||
openGeospatialOceanArea();
|
openGeospatialOceanArea();
|
||||||
break;
|
break;
|
||||||
|
case GEOMETRY_POINT:
|
||||||
|
openGeometryCreatePoint();
|
||||||
|
break;
|
||||||
case ANNOTATION_ADD:
|
case ANNOTATION_ADD:
|
||||||
break;
|
break;
|
||||||
case COLUMN_FILTER:
|
case COLUMN_FILTER:
|
||||||
|
@ -1977,6 +1972,20 @@ public class TabularDataController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openGeometryCreatePoint() {
|
||||||
|
Log.debug("Request Geometry Create Point Tab");
|
||||||
|
if (trId != null) {
|
||||||
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
|
WidgetRequestType.GEOMETRYCREATEPOINTPANEL);
|
||||||
|
e.setTrId(trId);
|
||||||
|
eventBus.fireEvent(e);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Log.error("TRId is null");
|
||||||
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import com.sencha.gxt.widget.core.client.container.Viewport;
|
||||||
*/
|
*/
|
||||||
public class TabularDataPortlet implements EntryPoint {
|
public class TabularDataPortlet implements EntryPoint {
|
||||||
|
|
||||||
protected static final String JSP_TAG_ID = "tdp";
|
private static final String JSP_TAG_ID = "tdp";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -435,6 +435,10 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
@Source("flag-green.png")
|
@Source("flag-green.png")
|
||||||
ImageResource geospatialCoordinates();
|
ImageResource geospatialCoordinates();
|
||||||
|
|
||||||
|
@Source("point_32.png")
|
||||||
|
ImageResource geometryPoint32();
|
||||||
|
|
||||||
|
@Source("point.png")
|
||||||
|
ImageResource geometryPoint();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 722 B |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -32,28 +32,17 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
*/
|
*/
|
||||||
public class AnalyseToolBar {
|
public class AnalyseToolBar {
|
||||||
|
|
||||||
protected EventBus eventBus;
|
private EventBus eventBus;
|
||||||
protected ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
//protected TextButton pieButton;
|
|
||||||
protected TextButton chartCreateButton;
|
private TextButton chartCreateButton;
|
||||||
//protected TextButton curveButton;
|
private TextButton statisticalButton;
|
||||||
//protected TextButton scatterButton;
|
private TextButton rstudioButton;
|
||||||
protected TextButton statisticalButton;
|
|
||||||
protected TextButton rstudioButton;
|
|
||||||
|
|
||||||
protected TextButton gisButton;
|
private TextButton gisButton;
|
||||||
protected TextButton spreadButton;
|
//private TextButton spreadButton;
|
||||||
protected TextButton filterButton;
|
|
||||||
protected TextButton unionButton;
|
|
||||||
protected TextButton groupbyButton;
|
|
||||||
protected TextButton aggregateButton;
|
|
||||||
protected TextButton addRowButton;
|
|
||||||
protected TextButton deleteRowButton;
|
|
||||||
protected TextButton deleteDuplicateButton;
|
|
||||||
// protected TextButton annotationButton;
|
|
||||||
protected TextButton filterColumnButton;
|
|
||||||
protected TextButton replaceValueBatchButton;
|
|
||||||
|
|
||||||
public AnalyseToolBar(EventBus eventBus) {
|
public AnalyseToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
@ -69,185 +58,6 @@ public class AnalyseToolBar {
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
|
||||||
// Table Group
|
|
||||||
ButtonGroup tableGroup = new ButtonGroup();
|
|
||||||
tableGroup.setId("Table");
|
|
||||||
tableGroup.setStyleName("ribbon");
|
|
||||||
tableGroup.setHeadingText("Table");
|
|
||||||
tableGroup.disable();
|
|
||||||
//toolBar.add(tableGroup);
|
|
||||||
|
|
||||||
FlexTable tableLayout = new FlexTable();
|
|
||||||
tableGroup.add(tableLayout);
|
|
||||||
|
|
||||||
filterButton = new TextButton("Filter",
|
|
||||||
TabularDataResources.INSTANCE.filter32());
|
|
||||||
filterButton.setScale(ButtonScale.LARGE);
|
|
||||||
filterButton.setIconAlign(IconAlign.TOP);
|
|
||||||
filterButton.setToolTip("Filter table data");
|
|
||||||
filterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
filterButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 0, filterButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
|
|
||||||
unionButton = new TextButton("Union",
|
|
||||||
TabularDataResources.INSTANCE.union32());
|
|
||||||
unionButton.setScale(ButtonScale.LARGE);
|
|
||||||
unionButton.setIconAlign(IconAlign.TOP);
|
|
||||||
unionButton.setToolTip("Merge tables data");
|
|
||||||
unionButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
unionButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 1, unionButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
|
||||||
|
|
||||||
groupbyButton = new TextButton("Group By",
|
|
||||||
TabularDataResources.INSTANCE.group32());
|
|
||||||
groupbyButton.setScale(ButtonScale.LARGE);
|
|
||||||
groupbyButton.setIconAlign(IconAlign.TOP);
|
|
||||||
groupbyButton.setToolTip("Perform data grouping");
|
|
||||||
groupbyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
groupbyButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 2, groupbyButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
|
||||||
|
|
||||||
aggregateButton = new TextButton("Aggregate",
|
|
||||||
TabularDataResources.INSTANCE.aggregate32());
|
|
||||||
aggregateButton.setScale(ButtonScale.LARGE);
|
|
||||||
aggregateButton.setIconAlign(IconAlign.TOP);
|
|
||||||
aggregateButton.setToolTip("Performs data aggregation");
|
|
||||||
aggregateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
aggregateButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 3, aggregateButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
|
||||||
|
|
||||||
addRowButton = new TextButton("Add Row",
|
|
||||||
TabularDataResources.INSTANCE.rowInsert32());
|
|
||||||
addRowButton.setScale(ButtonScale.LARGE);
|
|
||||||
addRowButton.setIconAlign(IconAlign.TOP);
|
|
||||||
addRowButton.setToolTip("Add row");
|
|
||||||
addRowButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
addRowButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 4, addRowButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
|
||||||
|
|
||||||
deleteRowButton = new TextButton("Delete Row",
|
|
||||||
TabularDataResources.INSTANCE.rowRemove32());
|
|
||||||
deleteRowButton.setScale(ButtonScale.LARGE);
|
|
||||||
deleteRowButton.setIconAlign(IconAlign.TOP);
|
|
||||||
deleteRowButton.setToolTip("Delete row");
|
|
||||||
deleteRowButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
deleteRowButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 5, deleteRowButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
|
||||||
|
|
||||||
deleteDuplicateButton = new TextButton("Delete Duplicate",
|
|
||||||
TabularDataResources.INSTANCE.tableDuplicateRowsRemove32());
|
|
||||||
deleteDuplicateButton.setScale(ButtonScale.LARGE);
|
|
||||||
deleteDuplicateButton.setIconAlign(IconAlign.TOP);
|
|
||||||
deleteDuplicateButton.setToolTip("Delete duplicate row");
|
|
||||||
deleteDuplicateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
deleteDuplicateButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 6, deleteDuplicateButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
|
||||||
cleanCells(tableLayout.getElement());
|
|
||||||
|
|
||||||
// Column Group
|
|
||||||
ButtonGroup columnGroup = new ButtonGroup();
|
|
||||||
columnGroup.setId("Column");
|
|
||||||
columnGroup.setStyleName("ribbon");
|
|
||||||
columnGroup.setHeadingText("Column");
|
|
||||||
columnGroup.disable();
|
|
||||||
//toolBar.add(columnGroup);
|
|
||||||
|
|
||||||
FlexTable columnLayout = new FlexTable();
|
|
||||||
columnGroup.add(columnLayout);
|
|
||||||
|
|
||||||
filterColumnButton = new TextButton("Filter",
|
|
||||||
TabularDataResources.INSTANCE.columnFilter32());
|
|
||||||
filterColumnButton.setScale(ButtonScale.LARGE);
|
|
||||||
filterColumnButton.setIconAlign(IconAlign.TOP);
|
|
||||||
filterColumnButton
|
|
||||||
.setToolTip("Filter column values according to an condition");
|
|
||||||
filterColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
filterColumnButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
columnLayout.setWidget(0, 0, filterColumnButton);
|
|
||||||
columnLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
|
|
||||||
replaceValueBatchButton = new TextButton("Replace Batch",
|
|
||||||
TabularDataResources.INSTANCE.columnReplaceBatch32());
|
|
||||||
replaceValueBatchButton.setScale(ButtonScale.LARGE);
|
|
||||||
replaceValueBatchButton.setIconAlign(IconAlign.TOP);
|
|
||||||
replaceValueBatchButton.setToolTip("Replace column values in batch");
|
|
||||||
replaceValueBatchButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
replaceValueBatchButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
columnLayout.setWidget(0, 1, replaceValueBatchButton);
|
|
||||||
columnLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
|
||||||
|
|
||||||
cleanCells(columnLayout.getElement());
|
|
||||||
|
|
||||||
// Charts Group
|
// Charts Group
|
||||||
ButtonGroup chartsGroup = new ButtonGroup();
|
ButtonGroup chartsGroup = new ButtonGroup();
|
||||||
chartsGroup.setId("Charts");
|
chartsGroup.setId("Charts");
|
||||||
|
@ -258,24 +68,7 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
FlexTable basicLayout = new FlexTable();
|
FlexTable basicLayout = new FlexTable();
|
||||||
chartsGroup.add(basicLayout);
|
chartsGroup.add(basicLayout);
|
||||||
/*
|
|
||||||
pieButton = new TextButton("Pie",
|
|
||||||
TabularDataResources.INSTANCE.chartPie32());
|
|
||||||
pieButton.setScale(ButtonScale.LARGE);
|
|
||||||
pieButton.setIconAlign(IconAlign.TOP);
|
|
||||||
pieButton.setToolTip("Pie");
|
|
||||||
pieButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
pieButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
basicLayout.setWidget(0, 0, pieButton);
|
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
chartCreateButton = new TextButton("Create Chart",
|
chartCreateButton = new TextButton("Create Chart",
|
||||||
TabularDataResources.INSTANCE.chartBar32());
|
TabularDataResources.INSTANCE.chartBar32());
|
||||||
|
@ -294,42 +87,7 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
basicLayout.setWidget(0, 0, chartCreateButton);
|
basicLayout.setWidget(0, 0, chartCreateButton);
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
/*
|
|
||||||
curveButton = new TextButton("Curve",
|
|
||||||
TabularDataResources.INSTANCE.chartCurve32());
|
|
||||||
curveButton.setScale(ButtonScale.LARGE);
|
|
||||||
curveButton.setIconAlign(IconAlign.TOP);
|
|
||||||
curveButton.setToolTip("Curve");
|
|
||||||
curveButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
curveButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
basicLayout.setWidget(0, 2, curveButton);
|
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
|
||||||
|
|
||||||
scatterButton = new TextButton("Scatter",
|
|
||||||
TabularDataResources.INSTANCE.chartBulls32());
|
|
||||||
scatterButton.setScale(ButtonScale.LARGE);
|
|
||||||
scatterButton.setIconAlign(IconAlign.TOP);
|
|
||||||
scatterButton.setToolTip("Scatter");
|
|
||||||
scatterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
scatterButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
basicLayout.setWidget(0, 3, scatterButton);
|
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
cleanCells(basicLayout.getElement());
|
cleanCells(basicLayout.getElement());
|
||||||
|
|
||||||
|
@ -378,7 +136,8 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
processLayout.setWidget(0, 1, statisticalButton);
|
processLayout.setWidget(0, 1, statisticalButton);
|
||||||
processLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
processLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
/*
|
||||||
spreadButton = new TextButton("SPREAD",
|
spreadButton = new TextButton("SPREAD",
|
||||||
TabularDataResources.INSTANCE.cog32());
|
TabularDataResources.INSTANCE.cog32());
|
||||||
spreadButton.disable();
|
spreadButton.disable();
|
||||||
|
@ -396,7 +155,8 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
processLayout.setWidget(0, 2, spreadButton);
|
processLayout.setWidget(0, 2, spreadButton);
|
||||||
processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
*/
|
||||||
|
|
||||||
cleanCells(processLayout.getElement());
|
cleanCells(processLayout.getElement());
|
||||||
|
|
||||||
// GIS
|
// GIS
|
||||||
|
|
|
@ -33,27 +33,27 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
*/
|
*/
|
||||||
public class CurationToolBar {
|
public class CurationToolBar {
|
||||||
|
|
||||||
protected EventBus eventBus;
|
private EventBus eventBus;
|
||||||
protected ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
protected TextButton duplicateDetectionButton;
|
private TextButton duplicateDetectionButton;
|
||||||
//protected TextButton rulesButton;
|
//private TextButton rulesButton;
|
||||||
//protected TextButton manageRulesButton;
|
//private TextButton manageRulesButton;
|
||||||
protected TextButton applyTemplateButton;
|
private TextButton applyTemplateButton;
|
||||||
protected TextButton normalizeButton;
|
private TextButton normalizeButton;
|
||||||
protected TextButton denormalizeButton;
|
private TextButton denormalizeButton;
|
||||||
protected TextButton changeColumnLabelButton;
|
private TextButton changeColumnLabelButton;
|
||||||
protected TextButton columnTypeButton;
|
private TextButton columnTypeButton;
|
||||||
protected TextButton tableTypeButton;
|
private TextButton tableTypeButton;
|
||||||
protected TextButton addColumnButton;
|
private TextButton addColumnButton;
|
||||||
protected TextButton deleteColumnButton;
|
private TextButton deleteColumnButton;
|
||||||
protected TextButton splitColumnButton;
|
private TextButton splitColumnButton;
|
||||||
protected TextButton mergeColumnButton;
|
private TextButton mergeColumnButton;
|
||||||
|
|
||||||
|
|
||||||
protected TextButton extractCodelistButton;
|
private TextButton extractCodelistButton;
|
||||||
protected TextButton codelistMappingButton;
|
private TextButton codelistMappingButton;
|
||||||
//protected TextButton generateSummaryButton;
|
//private TextButton generateSummaryButton;
|
||||||
|
|
||||||
public CurationToolBar(EventBus eventBus) {
|
public CurationToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
|
|
@ -33,42 +33,41 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
*/
|
*/
|
||||||
public class FileToolBar {
|
public class FileToolBar {
|
||||||
|
|
||||||
protected EventBus eventBus;
|
private EventBus eventBus;
|
||||||
protected ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
protected TextButton openButton;
|
private TextButton openButton;
|
||||||
protected TextButton cloneButton;
|
private TextButton cloneButton;
|
||||||
protected TextButton closeButton;
|
private TextButton closeButton;
|
||||||
|
|
||||||
protected TextButton deleteButton;
|
private TextButton deleteButton;
|
||||||
protected TextButton propertiesButton;
|
private TextButton propertiesButton;
|
||||||
|
|
||||||
protected TextButton importCSVButton;
|
private TextButton importCSVButton;
|
||||||
protected TextButton importJSONButton;
|
private TextButton importJSONButton;
|
||||||
protected TextButton importSDMXButton;
|
private TextButton importSDMXButton;
|
||||||
|
|
||||||
protected TextButton exportSDMXButton;
|
private TextButton exportSDMXButton;
|
||||||
protected TextButton exportCSVButton;
|
private TextButton exportCSVButton;
|
||||||
protected TextButton exportJSONButton;
|
private TextButton exportJSONButton;
|
||||||
|
|
||||||
//Template
|
//Template
|
||||||
protected TextButton templateNewButton;
|
private TextButton templateNewButton;
|
||||||
protected TextButton templateOpenButton;
|
private TextButton templateOpenButton;
|
||||||
protected TextButton templateDeleteButton;
|
private TextButton templateDeleteButton;
|
||||||
|
|
||||||
//Share
|
//Share
|
||||||
protected TextButton shareButton;
|
private TextButton shareButton;
|
||||||
|
|
||||||
protected TextButton timelineButton;
|
private TextButton timelineButton;
|
||||||
protected TextButton backgroundButton;
|
private TextButton backgroundButton;
|
||||||
|
|
||||||
// History
|
// History
|
||||||
protected TextButton historyButton;
|
private TextButton historyButton;
|
||||||
protected TextButton undoButton;
|
private TextButton undoButton;
|
||||||
//protected TextButton discardAllButton;
|
|
||||||
|
|
||||||
protected TextButton helpButton;
|
private TextButton helpButton;
|
||||||
protected TextButton logsButton;
|
//private TextButton logsButton;
|
||||||
|
|
||||||
|
|
||||||
public FileToolBar(EventBus eventBus) {
|
public FileToolBar(EventBus eventBus) {
|
||||||
|
@ -479,18 +478,6 @@ public class FileToolBar {
|
||||||
historyLayout.setWidget(0, 1, undoButton);
|
historyLayout.setWidget(0, 1, undoButton);
|
||||||
historyLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
historyLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
/*discardAllButton = new TextButton("Discard All",
|
|
||||||
TabularDataResources.INSTANCE.discardAll());
|
|
||||||
discardAllButton.disable();
|
|
||||||
discardAllButton.setToolTip("Discard all unsaved operations");
|
|
||||||
historyLayout.setWidget(1, 1, discardAllButton);
|
|
||||||
discardAllButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.DISCARDALL));
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
cleanCells(historyLayout.getElement());
|
cleanCells(historyLayout.getElement());
|
||||||
|
|
||||||
// Help
|
// Help
|
||||||
|
@ -587,7 +574,6 @@ public class FileToolBar {
|
||||||
backgroundButton.enable();
|
backgroundButton.enable();
|
||||||
historyButton.disable();
|
historyButton.disable();
|
||||||
undoButton.disable();
|
undoButton.disable();
|
||||||
//discardAllButton.disable();
|
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
|
@ -610,7 +596,6 @@ public class FileToolBar {
|
||||||
backgroundButton.enable();
|
backgroundButton.enable();
|
||||||
historyButton.disable();
|
historyButton.disable();
|
||||||
undoButton.disable();
|
undoButton.disable();
|
||||||
//discardAllButton.disable();
|
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
|
@ -639,7 +624,6 @@ public class FileToolBar {
|
||||||
backgroundButton.enable();
|
backgroundButton.enable();
|
||||||
historyButton.enable();
|
historyButton.enable();
|
||||||
undoButton.enable();
|
undoButton.enable();
|
||||||
//discardAllButton.disable();
|
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
openButton.disable();
|
openButton.disable();
|
||||||
|
@ -661,7 +645,6 @@ public class FileToolBar {
|
||||||
backgroundButton.disable();
|
backgroundButton.disable();
|
||||||
historyButton.disable();
|
historyButton.disable();
|
||||||
undoButton.disable();
|
undoButton.disable();
|
||||||
//discardAllButton.disable();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,31 +26,28 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author giancarlo email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ModifyToolBar {
|
public class ModifyToolBar {
|
||||||
|
|
||||||
protected EventBus eventBus;
|
private EventBus eventBus;
|
||||||
protected ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
//protected TextButton filterButton;
|
private TextButton unionButton;
|
||||||
protected TextButton unionButton;
|
private TextButton groupbyButton;
|
||||||
protected TextButton groupbyButton;
|
private TextButton timeAggregationButton;
|
||||||
//protected TextButton aggregateButton;
|
private TextButton replaceByExternalCol;
|
||||||
protected TextButton timeAggregationButton;
|
private TextButton addRowButton;
|
||||||
protected TextButton replaceByExternalCol;
|
private TextButton deleteRowButton;
|
||||||
protected TextButton addRowButton;
|
private TextButton deleteDuplicateButton;
|
||||||
protected TextButton deleteRowButton;
|
|
||||||
protected TextButton deleteDuplicateButton;
|
|
||||||
//protected TextButton annotationButton;
|
|
||||||
|
|
||||||
// Column
|
// Geospatial
|
||||||
protected TextButton csquareButton;
|
private TextButton csquareButton;
|
||||||
protected TextButton oceanAreaButton;
|
private TextButton oceanAreaButton;
|
||||||
|
private TextButton pointButton;
|
||||||
|
|
||||||
public ModifyToolBar(EventBus eventBus) {
|
public ModifyToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
@ -76,24 +73,6 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
FlexTable tableLayout = new FlexTable();
|
FlexTable tableLayout = new FlexTable();
|
||||||
tableGroup.add(tableLayout);
|
tableGroup.add(tableLayout);
|
||||||
/*
|
|
||||||
filterButton = new TextButton("Filter",
|
|
||||||
TabularDataResources.INSTANCE.filter32());
|
|
||||||
filterButton.disable();
|
|
||||||
filterButton.setScale(ButtonScale.LARGE);
|
|
||||||
filterButton.setIconAlign(IconAlign.TOP);
|
|
||||||
filterButton.setToolTip("Filter table data");
|
|
||||||
filterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
filterButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
//eventBus.fireEvent(new RibbonEvent(RibbonType.TABLEFILTER));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 0, filterButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
*/
|
|
||||||
unionButton = new TextButton("Union",
|
unionButton = new TextButton("Union",
|
||||||
TabularDataResources.INSTANCE.union32());
|
TabularDataResources.INSTANCE.union32());
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
|
@ -111,7 +90,6 @@ public class ModifyToolBar {
|
||||||
tableLayout.setWidget(0, 1, unionButton);
|
tableLayout.setWidget(0, 1, unionButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
groupbyButton = new TextButton("Group By",
|
groupbyButton = new TextButton("Group By",
|
||||||
TabularDataResources.INSTANCE.group32());
|
TabularDataResources.INSTANCE.group32());
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
|
@ -128,26 +106,7 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
tableLayout.setWidget(0, 2, groupbyButton);
|
tableLayout.setWidget(0, 2, groupbyButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
/*
|
|
||||||
aggregateButton = new TextButton("Aggregate",
|
|
||||||
TabularDataResources.INSTANCE.aggregate32());
|
|
||||||
aggregateButton.disable();
|
|
||||||
aggregateButton.setScale(ButtonScale.LARGE);
|
|
||||||
aggregateButton.setIconAlign(IconAlign.TOP);
|
|
||||||
aggregateButton.setToolTip("Performs data aggregation");
|
|
||||||
aggregateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
aggregateButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 3, aggregateButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
timeAggregationButton = new TextButton("Time Aggregation",
|
timeAggregationButton = new TextButton("Time Aggregation",
|
||||||
TabularDataResources.INSTANCE.timeAggregate32());
|
TabularDataResources.INSTANCE.timeAggregate32());
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
|
@ -158,14 +117,14 @@ public class ModifyToolBar {
|
||||||
timeAggregationButton.addSelectHandler(new SelectHandler() {
|
timeAggregationButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.TABLE_TIME_AGGREGATE));
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
RibbonType.TABLE_TIME_AGGREGATE));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tableLayout.setWidget(0, 3, timeAggregationButton);
|
tableLayout.setWidget(0, 3, timeAggregationButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
|
||||||
replaceByExternalCol = new TextButton("Replace by External",
|
replaceByExternalCol = new TextButton("Replace by External",
|
||||||
TabularDataResources.INSTANCE.replaceByExternalCol32());
|
TabularDataResources.INSTANCE.replaceByExternalCol32());
|
||||||
replaceByExternalCol.disable();
|
replaceByExternalCol.disable();
|
||||||
|
@ -176,16 +135,14 @@ public class ModifyToolBar {
|
||||||
replaceByExternalCol.addSelectHandler(new SelectHandler() {
|
replaceByExternalCol.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.TABLE_REPLACE_BY_EXTERNAL_COL));
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
RibbonType.TABLE_REPLACE_BY_EXTERNAL_COL));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tableLayout.setWidget(0, 4, replaceByExternalCol);
|
tableLayout.setWidget(0, 4, replaceByExternalCol);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addRowButton = new TextButton("Add Row",
|
addRowButton = new TextButton("Add Row",
|
||||||
TabularDataResources.INSTANCE.rowInsert32());
|
TabularDataResources.INSTANCE.rowInsert32());
|
||||||
addRowButton.disable();
|
addRowButton.disable();
|
||||||
|
@ -202,7 +159,7 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
tableLayout.setWidget(0, 5, addRowButton);
|
tableLayout.setWidget(0, 5, addRowButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
||||||
|
|
||||||
deleteRowButton = new TextButton("Delete Row",
|
deleteRowButton = new TextButton("Delete Row",
|
||||||
TabularDataResources.INSTANCE.rowRemove32());
|
TabularDataResources.INSTANCE.rowRemove32());
|
||||||
deleteRowButton.disable();
|
deleteRowButton.disable();
|
||||||
|
@ -219,7 +176,7 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
tableLayout.setWidget(0, 6, deleteRowButton);
|
tableLayout.setWidget(0, 6, deleteRowButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
||||||
|
|
||||||
deleteDuplicateButton = new TextButton("Delete Duplicate",
|
deleteDuplicateButton = new TextButton("Delete Duplicate",
|
||||||
TabularDataResources.INSTANCE.tableDuplicateRowsRemove32());
|
TabularDataResources.INSTANCE.tableDuplicateRowsRemove32());
|
||||||
deleteDuplicateButton.disable();
|
deleteDuplicateButton.disable();
|
||||||
|
@ -236,25 +193,6 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
tableLayout.setWidget(0, 7, deleteDuplicateButton);
|
tableLayout.setWidget(0, 7, deleteDuplicateButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
||||||
|
|
||||||
/*
|
|
||||||
annotationButton = new TextButton("Annotation",
|
|
||||||
TabularDataResources.INSTANCE.annotationAdd32());
|
|
||||||
annotationButton.disable();
|
|
||||||
annotationButton.setScale(ButtonScale.LARGE);
|
|
||||||
annotationButton.setIconAlign(IconAlign.TOP);
|
|
||||||
annotationButton.setToolTip("Add annotation column");
|
|
||||||
annotationButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
annotationButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
//eventBus.fireEvent(new RibbonEvent(RibbonType.ANNOTATIONADD));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 7, annotationButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
|
||||||
*/
|
|
||||||
cleanCells(tableLayout.getElement());
|
cleanCells(tableLayout.getElement());
|
||||||
|
|
||||||
// Geospatial Group
|
// Geospatial Group
|
||||||
|
@ -269,48 +207,73 @@ public class ModifyToolBar {
|
||||||
FlexTable geospatialLayout = new FlexTable();
|
FlexTable geospatialLayout = new FlexTable();
|
||||||
geospatialGroup.add(geospatialLayout);
|
geospatialGroup.add(geospatialLayout);
|
||||||
|
|
||||||
|
|
||||||
csquareButton = new TextButton("C-Square",
|
csquareButton = new TextButton("C-Square",
|
||||||
TabularDataResources.INSTANCE.geospatialCSquare32());
|
TabularDataResources.INSTANCE.geospatialCSquare32());
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
csquareButton.setScale(ButtonScale.LARGE);
|
csquareButton.setScale(ButtonScale.LARGE);
|
||||||
csquareButton.setIconAlign(IconAlign.TOP);
|
csquareButton.setIconAlign(IconAlign.TOP);
|
||||||
csquareButton
|
csquareButton.setToolTip("Create C-Square Coordinates");
|
||||||
.setToolTip("Create C-Square Coordinates");
|
csquareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
csquareButton
|
csquareButton.addSelectHandler(new SelectHandler() {
|
||||||
.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
csquareButton
|
|
||||||
.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.GEOSPATIAL_CSQUARE));
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
}
|
RibbonType.GEOSPATIAL_CSQUARE));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
geospatialLayout.setWidget(0, 0, csquareButton);
|
geospatialLayout.setWidget(0, 0, csquareButton);
|
||||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
|
||||||
oceanAreaButton = new TextButton("Ocean Area",
|
oceanAreaButton = new TextButton("Ocean Area",
|
||||||
TabularDataResources.INSTANCE.geospatialOceanArea32());
|
TabularDataResources.INSTANCE.geospatialOceanArea32());
|
||||||
oceanAreaButton.disable();
|
oceanAreaButton.disable();
|
||||||
oceanAreaButton.setScale(ButtonScale.LARGE);
|
oceanAreaButton.setScale(ButtonScale.LARGE);
|
||||||
oceanAreaButton.setIconAlign(IconAlign.TOP);
|
oceanAreaButton.setIconAlign(IconAlign.TOP);
|
||||||
oceanAreaButton
|
oceanAreaButton.setToolTip("Create Ocean Area Coordinates");
|
||||||
.setToolTip("Create Ocean Area Coordinates");
|
oceanAreaButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
oceanAreaButton
|
oceanAreaButton.addSelectHandler(new SelectHandler() {
|
||||||
.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
oceanAreaButton
|
|
||||||
.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.GEOSPATIAL_OCEAN_AREA));
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
}
|
RibbonType.GEOSPATIAL_OCEAN_AREA));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
geospatialLayout.setWidget(0, 1, oceanAreaButton);
|
geospatialLayout.setWidget(0, 1, oceanAreaButton);
|
||||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
cleanCells(geospatialLayout.getElement());
|
||||||
|
|
||||||
|
// Geometry Group
|
||||||
|
ButtonGroup geometryGroup = new ButtonGroup();
|
||||||
|
geometryGroup.setId("Geometry");
|
||||||
|
geometryGroup.setStyleName("ribbon");
|
||||||
|
geometryGroup.setHeadingText("Geometry");
|
||||||
|
geometryGroup.enable();
|
||||||
|
geometryGroup.setVisible(true);
|
||||||
|
toolBar.add(geometryGroup);
|
||||||
|
|
||||||
|
FlexTable geometryLayout = new FlexTable();
|
||||||
|
geometryGroup.add(geometryLayout);
|
||||||
|
|
||||||
|
pointButton = new TextButton("Point",
|
||||||
|
TabularDataResources.INSTANCE.geometryPoint32());
|
||||||
|
pointButton.disable();
|
||||||
|
pointButton.setScale(ButtonScale.LARGE);
|
||||||
|
pointButton.setIconAlign(IconAlign.TOP);
|
||||||
|
pointButton.setToolTip("Create Point");
|
||||||
|
pointButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
pointButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.GEOMETRY_POINT));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
geometryLayout.setWidget(0, 0, pointButton);
|
||||||
|
geometryLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
cleanCells(geospatialLayout.getElement());
|
cleanCells(geospatialLayout.getElement());
|
||||||
|
|
||||||
eventBus.addHandler(UIStateEvent.TYPE,
|
eventBus.addHandler(UIStateEvent.TYPE,
|
||||||
|
@ -334,84 +297,80 @@ public class ModifyToolBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setUI(UIStateEvent event) {
|
public void setUI(UIStateEvent event) {
|
||||||
UIStateType uiStateType = event.getUIStateType();
|
UIStateType uiStateType = event.getUIStateType();
|
||||||
try {
|
try {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
// Table
|
// Table
|
||||||
//filterButton.disable();
|
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
//aggregateButton.disable();
|
|
||||||
replaceByExternalCol.disable();
|
replaceByExternalCol.disable();
|
||||||
addRowButton.disable();
|
addRowButton.disable();
|
||||||
deleteRowButton.disable();
|
deleteRowButton.disable();
|
||||||
deleteDuplicateButton.disable();
|
deleteDuplicateButton.disable();
|
||||||
//annotationButton.disable();
|
// Geospatial
|
||||||
// geospatial
|
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
oceanAreaButton.disable();
|
||||||
|
// Geometry
|
||||||
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
// Table
|
// Table
|
||||||
//filterButton.disable();
|
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
//aggregateButton.disable();
|
|
||||||
replaceByExternalCol.disable();
|
replaceByExternalCol.disable();
|
||||||
addRowButton.disable();
|
addRowButton.disable();
|
||||||
deleteRowButton.disable();
|
deleteRowButton.disable();
|
||||||
deleteDuplicateButton.disable();
|
deleteDuplicateButton.disable();
|
||||||
//annotationButton.disable();
|
// Geospatial
|
||||||
// geospatial
|
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
oceanAreaButton.disable();
|
||||||
|
// Geometry
|
||||||
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
// Table
|
// Table
|
||||||
//filterButton.disable();
|
|
||||||
unionButton.enable();
|
unionButton.enable();
|
||||||
groupbyButton.enable();
|
groupbyButton.enable();
|
||||||
timeAggregationButton.enable();
|
timeAggregationButton.enable();
|
||||||
//aggregateButton.disable();
|
|
||||||
replaceByExternalCol.enable();
|
replaceByExternalCol.enable();
|
||||||
addRowButton.enable();
|
addRowButton.enable();
|
||||||
deleteRowButton.enable();
|
deleteRowButton.enable();
|
||||||
deleteDuplicateButton.enable();
|
deleteDuplicateButton.enable();
|
||||||
//annotationButton.disable();
|
// Geospatial
|
||||||
// geospatial
|
|
||||||
csquareButton.enable();
|
csquareButton.enable();
|
||||||
oceanAreaButton.enable();
|
oceanAreaButton.enable();
|
||||||
|
// Geometry
|
||||||
|
pointButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
// Table
|
// Table
|
||||||
//filterButton.disable();
|
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
//aggregateButton.disable();
|
|
||||||
replaceByExternalCol.disable();
|
replaceByExternalCol.disable();
|
||||||
addRowButton.disable();
|
addRowButton.disable();
|
||||||
deleteRowButton.disable();
|
deleteRowButton.disable();
|
||||||
deleteDuplicateButton.disable();
|
deleteDuplicateButton.disable();
|
||||||
//annotationButton.disable();
|
// Geospatial
|
||||||
// Column
|
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
oceanAreaButton.disable();
|
||||||
|
// Geometry
|
||||||
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.error("setUI Error on Ribbon Curation: " + e.getLocalizedMessage());
|
Log.error("setUI Error on Ribbon Curation: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ public class TabularDataRibbon {
|
||||||
|
|
||||||
private static final String RIBBON_HEIGHT = "100px";
|
private static final String RIBBON_HEIGHT = "100px";
|
||||||
|
|
||||||
protected TabPanel ribbon;
|
private TabPanel ribbon;
|
||||||
|
|
||||||
//protected PlainTabPanel ribbon;
|
//private PlainTabPanel ribbon;
|
||||||
|
|
||||||
protected FileToolBar fileToolBar;
|
private FileToolBar fileToolBar;
|
||||||
protected CurationToolBar curationToolBar;
|
private CurationToolBar curationToolBar;
|
||||||
protected ModifyToolBar modifyToolBar;
|
private ModifyToolBar modifyToolBar;
|
||||||
protected AnalyseToolBar analyseToolBar;
|
private AnalyseToolBar analyseToolBar;
|
||||||
|
|
||||||
public TabularDataRibbon(EventBus eventBus) {
|
public TabularDataRibbon(EventBus eventBus) {
|
||||||
try {
|
try {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 722 B |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue