Updated Ribbon
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113667 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -765,15 +765,6 @@ public class TabularDataController {
|
||||||
case EXPORT_JSON:
|
case EXPORT_JSON:
|
||||||
openJSONExportWizard();
|
openJSONExportWizard();
|
||||||
break;
|
break;
|
||||||
case TEMPLATE_OPEN:
|
|
||||||
openTemplateOpen();
|
|
||||||
break;
|
|
||||||
case TEMPLATE_NEW:
|
|
||||||
openTemplateNew();
|
|
||||||
break;
|
|
||||||
case TEMPLATE_DELETE:
|
|
||||||
openTemplateDelete();
|
|
||||||
break;
|
|
||||||
case SHARE:
|
case SHARE:
|
||||||
openShareWindow();
|
openShareWindow();
|
||||||
break;
|
break;
|
||||||
|
@ -802,9 +793,6 @@ public class TabularDataController {
|
||||||
case DUPLICATE_DETECTION:
|
case DUPLICATE_DETECTION:
|
||||||
openDuplicatesRows();
|
openDuplicatesRows();
|
||||||
break;
|
break;
|
||||||
case TEMPLATE_APPLY:
|
|
||||||
openTemplateApply();
|
|
||||||
break;
|
|
||||||
case TABLE_TYPE:
|
case TABLE_TYPE:
|
||||||
openTableType();
|
openTableType();
|
||||||
break;
|
break;
|
||||||
|
@ -843,7 +831,29 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case GENERATE_SUMMARY:
|
case GENERATE_SUMMARY:
|
||||||
break;
|
break;
|
||||||
case TABLE_FILTER:
|
case COLUMN_MULTI_FILTER:
|
||||||
|
//Filter On multicolumn
|
||||||
|
break;
|
||||||
|
case TABLE_REPLACE_BATCH:
|
||||||
|
break;
|
||||||
|
case TABLE_REPLACE_BY_EXPRESSION:
|
||||||
|
break;
|
||||||
|
case TABLE_REPLACE_BY_EXTERNAL_COL:
|
||||||
|
openReplaceByExternalColWizard();
|
||||||
|
break;
|
||||||
|
case ROW_DELETE:
|
||||||
|
doRowsDelete();
|
||||||
|
break;
|
||||||
|
case DUPLICATE_DELETE:
|
||||||
|
openDuplicatesRows();
|
||||||
|
break;
|
||||||
|
case BYEXPRESSION_DELETE:
|
||||||
|
break;
|
||||||
|
case ROW_ADD:
|
||||||
|
doRowAdd();
|
||||||
|
break;
|
||||||
|
case COLUMN_FILTER:
|
||||||
|
openColumnFilter();
|
||||||
break;
|
break;
|
||||||
case TABLE_UNION:
|
case TABLE_UNION:
|
||||||
openTableUnionWizard();
|
openTableUnionWizard();
|
||||||
|
@ -856,18 +866,6 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case TABLE_AGGREAGETE:
|
case TABLE_AGGREAGETE:
|
||||||
break;
|
break;
|
||||||
case TABLE_REPLACE_BY_EXTERNAL_COL:
|
|
||||||
openReplaceByExternalColWizard();
|
|
||||||
break;
|
|
||||||
case ROW_ADD:
|
|
||||||
doRowAdd();
|
|
||||||
break;
|
|
||||||
case ROW_DELETE:
|
|
||||||
doRowsDelete();
|
|
||||||
break;
|
|
||||||
case DUPLICATE_DELETE:
|
|
||||||
openDuplicatesRows();
|
|
||||||
break;
|
|
||||||
case GEOSPATIAL_CSQUARE:
|
case GEOSPATIAL_CSQUARE:
|
||||||
openGeospatialCSquare();
|
openGeospatialCSquare();
|
||||||
break;
|
break;
|
||||||
|
@ -882,11 +880,20 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case ANNOTATION_ADD:
|
case ANNOTATION_ADD:
|
||||||
break;
|
break;
|
||||||
case COLUMN_FILTER:
|
|
||||||
openMultiColumnFilter();
|
|
||||||
break;
|
|
||||||
case COLUMN_BATCH_REPLACE:
|
case COLUMN_BATCH_REPLACE:
|
||||||
break;
|
break;
|
||||||
|
case TEMPLATE_OPEN:
|
||||||
|
openTemplateOpen();
|
||||||
|
break;
|
||||||
|
case TEMPLATE_NEW:
|
||||||
|
openTemplateNew();
|
||||||
|
break;
|
||||||
|
case TEMPLATE_DELETE:
|
||||||
|
openTemplateDelete();
|
||||||
|
break;
|
||||||
|
case TEMPLATE_APPLY:
|
||||||
|
openTemplateApply();
|
||||||
|
break;
|
||||||
case ANALYSE_TABLE_FILTER:
|
case ANALYSE_TABLE_FILTER:
|
||||||
break;
|
break;
|
||||||
case ANALYSE_TABLE_UNION:
|
case ANALYSE_TABLE_UNION:
|
||||||
|
@ -921,6 +928,7 @@ public class TabularDataController {
|
||||||
case CREATE_GIS_MAP:
|
case CREATE_GIS_MAP:
|
||||||
openCreateMapWizard();
|
openCreateMapWizard();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1680,6 +1688,7 @@ public class TabularDataController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private void openMultiColumnFilter() {
|
private void openMultiColumnFilter() {
|
||||||
Log.debug("Request Open Multi Column Filter Dialog");
|
Log.debug("Request Open Multi Column Filter Dialog");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
|
@ -1691,6 +1700,11 @@ public class TabularDataController {
|
||||||
UtilsGXT3.alert("Error", "No current tabular resource present");
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openColumnFilter(){
|
||||||
|
openColumnFilter(null,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void openColumnFilter(String columnLocalId, String columnName) {
|
private void openColumnFilter(String columnLocalId, String columnName) {
|
||||||
Log.debug("Request Open Column Filter Dialog");
|
Log.debug("Request Open Column Filter Dialog");
|
||||||
|
|
|
@ -228,6 +228,12 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
@Source("column-replace_32.png")
|
@Source("column-replace_32.png")
|
||||||
ImageResource columnReplace32();
|
ImageResource columnReplace32();
|
||||||
|
|
||||||
|
@Source("column-replace-all.png")
|
||||||
|
ImageResource columnReplaceAll();
|
||||||
|
|
||||||
|
@Source("column-replace-all_32.png")
|
||||||
|
ImageResource columnReplaceAll32();
|
||||||
|
|
||||||
@Source("column-replace-batch.png")
|
@Source("column-replace-batch.png")
|
||||||
ImageResource columnReplaceBatch();
|
ImageResource columnReplaceBatch();
|
||||||
|
|
||||||
|
@ -277,10 +283,28 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
ImageResource rowInsert();
|
ImageResource rowInsert();
|
||||||
|
|
||||||
@Source("table-row-delete_32.png")
|
@Source("table-row-delete_32.png")
|
||||||
ImageResource rowRemove32();
|
ImageResource tableRowDelete32();
|
||||||
|
|
||||||
@Source("table-row-delete.png")
|
@Source("table-row-delete.png")
|
||||||
ImageResource rowRemove();
|
ImageResource tableRowDelete();
|
||||||
|
|
||||||
|
@Source("table-row-delete-selected_32.png")
|
||||||
|
ImageResource tableRowDeleteSelected32();
|
||||||
|
|
||||||
|
@Source("table-row-delete-selected.png")
|
||||||
|
ImageResource tableRowDeleteSelected();
|
||||||
|
|
||||||
|
@Source("table-row-delete-byexpression_32.png")
|
||||||
|
ImageResource tableRowDeleteByExpression32();
|
||||||
|
|
||||||
|
@Source("table-row-delete-byexpression.png")
|
||||||
|
ImageResource tableRowDeleteByExpression();
|
||||||
|
|
||||||
|
@Source("table-replace-rows_32.png")
|
||||||
|
ImageResource tableReplaceRows32();
|
||||||
|
|
||||||
|
@Source("table-replace-rows.png")
|
||||||
|
ImageResource tableReplaceRows();
|
||||||
|
|
||||||
@Source("help_32.png")
|
@Source("help_32.png")
|
||||||
ImageResource help32();
|
ImageResource help32();
|
||||||
|
|
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 773 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 849 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 879 B |
After Width: | Height: | Size: 1.9 KiB |
|
@ -38,10 +38,7 @@ public class CurationToolBar {
|
||||||
|
|
||||||
//Validation
|
//Validation
|
||||||
private TextButton duplicateDetectionButton;
|
private TextButton duplicateDetectionButton;
|
||||||
private TextButton applyTemplateButton;
|
|
||||||
//private TextButton rulesButton;
|
|
||||||
//private TextButton manageRulesButton;
|
|
||||||
|
|
||||||
//Structure
|
//Structure
|
||||||
private TextButton tableTypeButton;
|
private TextButton tableTypeButton;
|
||||||
private TextButton changePositionColumnButton;
|
private TextButton changePositionColumnButton;
|
||||||
|
@ -84,41 +81,7 @@ public class CurationToolBar {
|
||||||
|
|
||||||
FlexTable validationLayout = new FlexTable();
|
FlexTable validationLayout = new FlexTable();
|
||||||
validationGroup.add(validationLayout);
|
validationGroup.add(validationLayout);
|
||||||
/*
|
|
||||||
rulesButton = new TextButton("New Rule",
|
|
||||||
TabularDataResources.INSTANCE.ruleAdd32());
|
|
||||||
rulesButton.disable();
|
|
||||||
rulesButton.setScale(ButtonScale.LARGE);
|
|
||||||
rulesButton.setIconAlign(IconAlign.TOP);
|
|
||||||
rulesButton.setToolTip("Define a new validation rule");
|
|
||||||
rulesButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
rulesButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.RULENEW));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
validationLayout.setWidget(0, 1, rulesButton);
|
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
|
||||||
|
|
||||||
manageRulesButton = new TextButton("Manage Rules",
|
|
||||||
TabularDataResources.INSTANCE.wrenchManage32());
|
|
||||||
manageRulesButton.disable();
|
|
||||||
manageRulesButton.setScale(ButtonScale.LARGE);
|
|
||||||
manageRulesButton.setIconAlign(IconAlign.TOP);
|
|
||||||
manageRulesButton.setToolTip("View defined rules and apply");
|
|
||||||
manageRulesButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
manageRulesButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.RULEMANAGE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
validationLayout.setWidget(0, 2, manageRulesButton);
|
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
duplicateDetectionButton = new TextButton("Duplicate Detection",
|
duplicateDetectionButton = new TextButton("Duplicate Detection",
|
||||||
TabularDataResources.INSTANCE.tableDuplicateRows32());
|
TabularDataResources.INSTANCE.tableDuplicateRows32());
|
||||||
|
@ -139,22 +102,7 @@ public class CurationToolBar {
|
||||||
validationLayout.setWidget(0, 0, duplicateDetectionButton);
|
validationLayout.setWidget(0, 0, duplicateDetectionButton);
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
validationLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
applyTemplateButton = new TextButton("Apply Template",
|
|
||||||
TabularDataResources.INSTANCE.templateApply32());
|
|
||||||
applyTemplateButton.disable();
|
|
||||||
applyTemplateButton.setScale(ButtonScale.LARGE);
|
|
||||||
applyTemplateButton.setIconAlign(IconAlign.TOP);
|
|
||||||
applyTemplateButton.setToolTip("Apply Template");
|
|
||||||
applyTemplateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
applyTemplateButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.TEMPLATE_APPLY));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
validationLayout.setWidget(0, 1, applyTemplateButton);
|
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
|
||||||
|
|
||||||
cleanCells(validationLayout.getElement());
|
cleanCells(validationLayout.getElement());
|
||||||
|
|
||||||
|
@ -438,10 +386,7 @@ public class CurationToolBar {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
applyTemplateButton.disable();
|
|
||||||
//rulesButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
|
|
||||||
tableTypeButton.disable();
|
tableTypeButton.disable();
|
||||||
changePositionColumnButton.disable();
|
changePositionColumnButton.disable();
|
||||||
changeColumnLabelButton.disable();
|
changeColumnLabelButton.disable();
|
||||||
|
@ -461,9 +406,6 @@ public class CurationToolBar {
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
applyTemplateButton.disable();
|
|
||||||
//rulesButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
|
|
||||||
tableTypeButton.disable();
|
tableTypeButton.disable();
|
||||||
changePositionColumnButton.disable();
|
changePositionColumnButton.disable();
|
||||||
|
@ -484,10 +426,7 @@ public class CurationToolBar {
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
duplicateDetectionButton.enable();
|
duplicateDetectionButton.enable();
|
||||||
//rulesButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
applyTemplateButton.enable();
|
|
||||||
|
|
||||||
tableTypeButton.enable();
|
tableTypeButton.enable();
|
||||||
changePositionColumnButton.enable();
|
changePositionColumnButton.enable();
|
||||||
changeColumnLabelButton.enable();
|
changeColumnLabelButton.enable();
|
||||||
|
@ -511,9 +450,6 @@ public class CurationToolBar {
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
applyTemplateButton.disable();
|
|
||||||
//rulesButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
|
|
||||||
tableTypeButton.disable();
|
tableTypeButton.disable();
|
||||||
changePositionColumnButton.disable();
|
changePositionColumnButton.disable();
|
||||||
|
|
|
@ -81,9 +81,9 @@ public class FileToolBar {
|
||||||
|
|
||||||
// File
|
// File
|
||||||
ButtonGroup fileGroup = new ButtonGroup();
|
ButtonGroup fileGroup = new ButtonGroup();
|
||||||
fileGroup.setId("File");
|
fileGroup.setId("Tabular Resource");
|
||||||
fileGroup.setStyleName("ribbon");
|
fileGroup.setStyleName("ribbon");
|
||||||
fileGroup.setHeadingText("File");
|
fileGroup.setHeadingText("Tabular Resource");
|
||||||
toolBar.add(fileGroup);
|
toolBar.add(fileGroup);
|
||||||
|
|
||||||
FlexTable fileLayout = new FlexTable();
|
FlexTable fileLayout = new FlexTable();
|
||||||
|
@ -149,6 +149,26 @@ public class FileToolBar {
|
||||||
|
|
||||||
fileLayout.setWidget(0, 2, cloneButton);
|
fileLayout.setWidget(0, 2, cloneButton);
|
||||||
fileLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
fileLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
|
shareButton = new TextButton("Share",
|
||||||
|
TabularDataResources.INSTANCE.share32());
|
||||||
|
shareButton.disable();
|
||||||
|
shareButton.setId("shareButton");
|
||||||
|
shareButton.setScale(ButtonScale.LARGE);
|
||||||
|
shareButton.setIconAlign(IconAlign.TOP);
|
||||||
|
shareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
shareButton.setToolTip("Share Tabular Resource");
|
||||||
|
|
||||||
|
shareButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.SHARE));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fileLayout.setWidget(0, 3, shareButton);
|
||||||
|
fileLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
|
||||||
deleteButton = new TextButton("Delete",
|
deleteButton = new TextButton("Delete",
|
||||||
|
@ -157,7 +177,7 @@ public class FileToolBar {
|
||||||
deleteButton.setId("closeButton");
|
deleteButton.setId("closeButton");
|
||||||
deleteButton.setToolTip("Delete Tabular Resource");
|
deleteButton.setToolTip("Delete Tabular Resource");
|
||||||
|
|
||||||
fileLayout.setWidget(0, 3, deleteButton);
|
fileLayout.setWidget(0, 4, deleteButton);
|
||||||
deleteButton.addSelectHandler(new SelectHandler() {
|
deleteButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -171,7 +191,7 @@ public class FileToolBar {
|
||||||
propertiesButton.setId("propertiesButton");
|
propertiesButton.setId("propertiesButton");
|
||||||
propertiesButton.setToolTip("Show properties");
|
propertiesButton.setToolTip("Show properties");
|
||||||
|
|
||||||
fileLayout.setWidget(1, 3, propertiesButton);
|
fileLayout.setWidget(1, 4, propertiesButton);
|
||||||
propertiesButton.addSelectHandler(new SelectHandler() {
|
propertiesButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -291,35 +311,6 @@ public class FileToolBar {
|
||||||
exportLayout.setWidget(1, 2, exportJSONButton);
|
exportLayout.setWidget(1, 2, exportJSONButton);
|
||||||
cleanCells(exportLayout.getElement());
|
cleanCells(exportLayout.getElement());
|
||||||
|
|
||||||
// Share
|
|
||||||
ButtonGroup shareGroup = new ButtonGroup();
|
|
||||||
shareGroup.setId("Share");
|
|
||||||
shareGroup.setStyleName("ribbon");
|
|
||||||
shareGroup.setHeadingText("Share");
|
|
||||||
toolBar.add(shareGroup);
|
|
||||||
|
|
||||||
FlexTable shareLayout = new FlexTable();
|
|
||||||
shareGroup.add(shareLayout);
|
|
||||||
|
|
||||||
shareButton = new TextButton("Share",
|
|
||||||
TabularDataResources.INSTANCE.share32());
|
|
||||||
shareButton.disable();
|
|
||||||
shareButton.setId("shareButton");
|
|
||||||
shareButton.setScale(ButtonScale.LARGE);
|
|
||||||
shareButton.setIconAlign(IconAlign.TOP);
|
|
||||||
shareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
shareButton.setToolTip("Share Tabular Resource");
|
|
||||||
|
|
||||||
shareButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.SHARE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
shareLayout.setWidget(0, 0, shareButton);
|
|
||||||
shareLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
|
||||||
cleanCells(shareLayout.getElement());
|
|
||||||
|
|
||||||
// TimeLine (Tasks)
|
// TimeLine (Tasks)
|
||||||
ButtonGroup taskGroup = new ButtonGroup();
|
ButtonGroup taskGroup = new ButtonGroup();
|
||||||
|
|
|
@ -12,6 +12,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.NodeList;
|
import com.google.gwt.dom.client.NodeList;
|
||||||
|
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||||
|
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
||||||
|
@ -22,6 +24,9 @@ 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.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
|
import com.sencha.gxt.widget.core.client.menu.Item;
|
||||||
|
import com.sencha.gxt.widget.core.client.menu.Menu;
|
||||||
|
import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,23 +40,37 @@ public class ModifyToolBar {
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
private ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
// Table
|
// Tool
|
||||||
|
private TextButton replaceButton;
|
||||||
|
private TextButton deleteButton;
|
||||||
|
private TextButton filterButton;
|
||||||
private TextButton unionButton;
|
private TextButton unionButton;
|
||||||
|
private TextButton addRowButton;
|
||||||
|
|
||||||
|
// Group
|
||||||
private TextButton groupbyButton;
|
private TextButton groupbyButton;
|
||||||
private TextButton timeAggregationButton;
|
private TextButton timeAggregationButton;
|
||||||
private TextButton replaceByExternalCol;
|
|
||||||
private TextButton addRowButton;
|
|
||||||
private TextButton deleteRowButton;
|
|
||||||
private TextButton deleteDuplicateButton;
|
|
||||||
|
|
||||||
// Geospatial
|
// Geospatial
|
||||||
private TextButton csquareButton;
|
private TextButton csquareButton;
|
||||||
private TextButton oceanAreaButton;
|
private TextButton oceanAreaButton;
|
||||||
private TextButton downscaleCSquareButton;
|
private TextButton downscaleCSquareButton;
|
||||||
|
|
||||||
// Geometry
|
// Geometry
|
||||||
private TextButton pointButton;
|
private TextButton pointButton;
|
||||||
|
|
||||||
|
// Menu
|
||||||
|
|
||||||
|
// Replace Menu
|
||||||
|
private MenuItem replaceBatchItem;
|
||||||
|
private MenuItem replaceByExpressionItem;
|
||||||
|
private MenuItem replaceByExternalColItem;
|
||||||
|
// Delete Menu
|
||||||
|
|
||||||
|
private MenuItem deleteSelectedRowsItem;
|
||||||
|
private MenuItem deleteDuplicateItem;
|
||||||
|
private MenuItem deleteByExpression;
|
||||||
|
|
||||||
public ModifyToolBar(EventBus eventBus) {
|
public ModifyToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
build();
|
build();
|
||||||
|
@ -66,16 +85,77 @@ public class ModifyToolBar {
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
|
||||||
// Table Group
|
// Tools Group
|
||||||
ButtonGroup tableGroup = new ButtonGroup();
|
ButtonGroup toolsGroup = new ButtonGroup();
|
||||||
tableGroup.setId("Table");
|
toolsGroup.setId("Tools");
|
||||||
tableGroup.setStyleName("ribbon");
|
toolsGroup.setStyleName("ribbon");
|
||||||
tableGroup.setHeadingText("Table");
|
toolsGroup.setHeadingText("Tools");
|
||||||
tableGroup.enable();
|
toolsGroup.enable();
|
||||||
toolBar.add(tableGroup);
|
toolBar.add(toolsGroup);
|
||||||
|
|
||||||
|
FlexTable toolsLayout = new FlexTable();
|
||||||
|
toolsGroup.add(toolsLayout);
|
||||||
|
|
||||||
|
replaceButton = new TextButton("Replace",
|
||||||
|
TabularDataResources.INSTANCE.tableReplaceRows32());
|
||||||
|
replaceButton.disable();
|
||||||
|
replaceButton.setScale(ButtonScale.LARGE);
|
||||||
|
replaceButton.setIconAlign(IconAlign.TOP);
|
||||||
|
replaceButton.setToolTip("Replace rows");
|
||||||
|
replaceButton.setArrowAlign(ButtonArrowAlign.RIGHT);
|
||||||
|
replaceButton.setMenu(createReplaceMenu());
|
||||||
|
|
||||||
|
toolsLayout.setWidget(0, 0, replaceButton);
|
||||||
|
toolsLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
deleteButton = new TextButton("Delete",
|
||||||
|
TabularDataResources.INSTANCE.tableRowDelete32());
|
||||||
|
deleteButton.disable();
|
||||||
|
deleteButton.setScale(ButtonScale.LARGE);
|
||||||
|
deleteButton.setIconAlign(IconAlign.TOP);
|
||||||
|
deleteButton.setToolTip("Delete rows");
|
||||||
|
deleteButton.setArrowAlign(ButtonArrowAlign.RIGHT);
|
||||||
|
deleteButton.setMenu(createDeleteMenu());
|
||||||
|
|
||||||
|
toolsLayout.setWidget(0, 1, deleteButton);
|
||||||
|
toolsLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
|
addRowButton = new TextButton("Add Row",
|
||||||
|
TabularDataResources.INSTANCE.rowInsert32());
|
||||||
|
addRowButton.disable();
|
||||||
|
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.ROW_ADD));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
toolsLayout.setWidget(0, 2, addRowButton);
|
||||||
|
toolsLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
|
filterButton = new TextButton("Filter",
|
||||||
|
TabularDataResources.INSTANCE.filter32());
|
||||||
|
filterButton.disable();
|
||||||
|
filterButton.setScale(ButtonScale.LARGE);
|
||||||
|
filterButton.setIconAlign(IconAlign.TOP);
|
||||||
|
filterButton.setToolTip("Filter rows");
|
||||||
|
filterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
filterButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.COLUMN_FILTER));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
toolsLayout.setWidget(0, 3, filterButton);
|
||||||
|
toolsLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
FlexTable tableLayout = new FlexTable();
|
|
||||||
tableGroup.add(tableLayout);
|
|
||||||
unionButton = new TextButton("Union",
|
unionButton = new TextButton("Union",
|
||||||
TabularDataResources.INSTANCE.union32());
|
TabularDataResources.INSTANCE.union32());
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
|
@ -90,8 +170,21 @@ public class ModifyToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tableLayout.setWidget(0, 1, unionButton);
|
toolsLayout.setWidget(0, 4, unionButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
toolsLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||||
|
|
||||||
|
cleanCells(toolsLayout.getElement());
|
||||||
|
|
||||||
|
// Group Group
|
||||||
|
ButtonGroup groupGroup = new ButtonGroup();
|
||||||
|
groupGroup.setId("Group");
|
||||||
|
groupGroup.setStyleName("ribbon");
|
||||||
|
groupGroup.setHeadingText("Group");
|
||||||
|
groupGroup.enable();
|
||||||
|
toolBar.add(groupGroup);
|
||||||
|
|
||||||
|
FlexTable groupLayout = new FlexTable();
|
||||||
|
groupGroup.add(groupLayout);
|
||||||
|
|
||||||
groupbyButton = new TextButton("Group By",
|
groupbyButton = new TextButton("Group By",
|
||||||
TabularDataResources.INSTANCE.group32());
|
TabularDataResources.INSTANCE.group32());
|
||||||
|
@ -107,8 +200,8 @@ public class ModifyToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tableLayout.setWidget(0, 2, groupbyButton);
|
groupLayout.setWidget(0, 0, groupbyButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
groupLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
timeAggregationButton = new TextButton("Time Aggregation",
|
timeAggregationButton = new TextButton("Time Aggregation",
|
||||||
TabularDataResources.INSTANCE.timeAggregate32());
|
TabularDataResources.INSTANCE.timeAggregate32());
|
||||||
|
@ -125,78 +218,9 @@ public class ModifyToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tableLayout.setWidget(0, 3, timeAggregationButton);
|
groupLayout.setWidget(0, 1, timeAggregationButton);
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
groupLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
cleanCells(groupLayout.getElement());
|
||||||
replaceByExternalCol = new TextButton("Replace by External",
|
|
||||||
TabularDataResources.INSTANCE.replaceByExternalCol32());
|
|
||||||
replaceByExternalCol.disable();
|
|
||||||
replaceByExternalCol.setScale(ButtonScale.LARGE);
|
|
||||||
replaceByExternalCol.setIconAlign(IconAlign.TOP);
|
|
||||||
replaceByExternalCol.setToolTip("Replace by external columns");
|
|
||||||
replaceByExternalCol.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
replaceByExternalCol.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(
|
|
||||||
RibbonType.TABLE_REPLACE_BY_EXTERNAL_COL));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 4, replaceByExternalCol);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
|
||||||
|
|
||||||
addRowButton = new TextButton("Add Row",
|
|
||||||
TabularDataResources.INSTANCE.rowInsert32());
|
|
||||||
addRowButton.disable();
|
|
||||||
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.ROW_ADD));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 5, addRowButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
|
||||||
|
|
||||||
deleteRowButton = new TextButton("Delete Row",
|
|
||||||
TabularDataResources.INSTANCE.rowRemove32());
|
|
||||||
deleteRowButton.disable();
|
|
||||||
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.ROW_DELETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 6, deleteRowButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
|
||||||
|
|
||||||
deleteDuplicateButton = new TextButton("Delete Duplicate",
|
|
||||||
TabularDataResources.INSTANCE.tableDuplicateRowsRemove32());
|
|
||||||
deleteDuplicateButton.disable();
|
|
||||||
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.DUPLICATE_DELETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tableLayout.setWidget(0, 7, deleteDuplicateButton);
|
|
||||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
|
||||||
cleanCells(tableLayout.getElement());
|
|
||||||
|
|
||||||
// Geospatial Group
|
// Geospatial Group
|
||||||
ButtonGroup geospatialGroup = new ButtonGroup();
|
ButtonGroup geospatialGroup = new ButtonGroup();
|
||||||
|
@ -228,6 +252,24 @@ public class ModifyToolBar {
|
||||||
geospatialLayout.setWidget(0, 0, csquareButton);
|
geospatialLayout.setWidget(0, 0, csquareButton);
|
||||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
downscaleCSquareButton = new TextButton("Downscale",
|
||||||
|
TabularDataResources.INSTANCE.downscaleCSquare32());
|
||||||
|
downscaleCSquareButton.disable();
|
||||||
|
downscaleCSquareButton.setScale(ButtonScale.LARGE);
|
||||||
|
downscaleCSquareButton.setIconAlign(IconAlign.TOP);
|
||||||
|
downscaleCSquareButton.setToolTip("Downscale C-Square Coordinates");
|
||||||
|
downscaleCSquareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
downscaleCSquareButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.DOWNSCALE_CSQUARE));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
geospatialLayout.setWidget(0, 1, downscaleCSquareButton);
|
||||||
|
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
oceanAreaButton = new TextButton("Ocean Area",
|
oceanAreaButton = new TextButton("Ocean Area",
|
||||||
TabularDataResources.INSTANCE.geospatialOceanArea32());
|
TabularDataResources.INSTANCE.geospatialOceanArea32());
|
||||||
oceanAreaButton.disable();
|
oceanAreaButton.disable();
|
||||||
|
@ -243,30 +285,11 @@ public class ModifyToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
geospatialLayout.setWidget(0, 1, oceanAreaButton);
|
geospatialLayout.setWidget(0, 2, oceanAreaButton);
|
||||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
|
||||||
|
|
||||||
|
|
||||||
downscaleCSquareButton = new TextButton("Downscale C-Square",
|
|
||||||
TabularDataResources.INSTANCE.downscaleCSquare32());
|
|
||||||
downscaleCSquareButton.disable();
|
|
||||||
downscaleCSquareButton.setScale(ButtonScale.LARGE);
|
|
||||||
downscaleCSquareButton.setIconAlign(IconAlign.TOP);
|
|
||||||
downscaleCSquareButton.setToolTip("Downscale C-Square Coordinates");
|
|
||||||
downscaleCSquareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
|
||||||
downscaleCSquareButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
eventBus.fireEvent(new RibbonEvent(
|
|
||||||
RibbonType.DOWNSCALE_CSQUARE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
geospatialLayout.setWidget(0, 2, downscaleCSquareButton);
|
|
||||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
cleanCells(geospatialLayout.getElement());
|
|
||||||
|
|
||||||
|
cleanCells(geospatialLayout.getElement());
|
||||||
|
|
||||||
// Geometry Group
|
// Geometry Group
|
||||||
ButtonGroup geometryGroup = new ButtonGroup();
|
ButtonGroup geometryGroup = new ButtonGroup();
|
||||||
geometryGroup.setId("Geometry");
|
geometryGroup.setId("Geometry");
|
||||||
|
@ -309,6 +332,99 @@ public class ModifyToolBar {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Menu createReplaceMenu() {
|
||||||
|
Menu menuReplace = new Menu();
|
||||||
|
replaceBatchItem = new MenuItem("Batch",
|
||||||
|
TabularDataResources.INSTANCE.columnReplaceBatch());
|
||||||
|
replaceByExpressionItem = new MenuItem("By Expression",
|
||||||
|
TabularDataResources.INSTANCE.columnReplaceByExpression());
|
||||||
|
replaceByExternalColItem = new MenuItem("By External",
|
||||||
|
TabularDataResources.INSTANCE.replaceByExternalCol());
|
||||||
|
|
||||||
|
replaceBatchItem
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
RibbonType.TABLE_REPLACE_BATCH));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
replaceByExpressionItem
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
RibbonType.TABLE_REPLACE_BY_EXPRESSION));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
replaceByExternalColItem
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
RibbonType.TABLE_REPLACE_BY_EXTERNAL_COL));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
menuReplace.add(replaceBatchItem);
|
||||||
|
menuReplace.add(replaceByExpressionItem);
|
||||||
|
menuReplace.add(replaceByExternalColItem);
|
||||||
|
return menuReplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Menu createDeleteMenu() {
|
||||||
|
Menu menuDelete = new Menu();
|
||||||
|
deleteSelectedRowsItem = new MenuItem("Selected Rows",
|
||||||
|
TabularDataResources.INSTANCE.tableRowDeleteSelected());
|
||||||
|
deleteDuplicateItem = new MenuItem("Duplicate",
|
||||||
|
TabularDataResources.INSTANCE.tableDuplicateRowsRemove());
|
||||||
|
deleteByExpression = new MenuItem("By Expression",
|
||||||
|
TabularDataResources.INSTANCE.tableRowDeleteByExpression());
|
||||||
|
|
||||||
|
deleteSelectedRowsItem
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.ROW_DELETE));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
deleteDuplicateItem
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.DUPLICATE_DELETE));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
deleteByExpression
|
||||||
|
.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelection(SelectionEvent<Item> event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.BYEXPRESSION_DELETE));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
menuDelete.add(deleteSelectedRowsItem);
|
||||||
|
menuDelete.add(deleteDuplicateItem);
|
||||||
|
menuDelete.add(deleteByExpression);
|
||||||
|
return menuDelete;
|
||||||
|
}
|
||||||
|
|
||||||
protected void cleanCells(Element elem) {
|
protected void cleanCells(Element elem) {
|
||||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||||
for (int i = 0; i < tds.getLength(); i++) {
|
for (int i = 0; i < tds.getLength(); i++) {
|
||||||
|
@ -320,74 +436,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
|
// Tools
|
||||||
|
replaceButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
filterButton.disable();
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
|
addRowButton.disable();
|
||||||
|
//Group
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
replaceByExternalCol.disable();
|
|
||||||
addRowButton.disable();
|
|
||||||
deleteRowButton.disable();
|
|
||||||
deleteDuplicateButton.disable();
|
|
||||||
// Geospatial
|
// Geospatial
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
|
||||||
downscaleCSquareButton.disable();
|
downscaleCSquareButton.disable();
|
||||||
|
oceanAreaButton.disable();
|
||||||
// Geometry
|
// Geometry
|
||||||
pointButton.disable();
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
// Table
|
// Tools
|
||||||
|
replaceButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
filterButton.disable();
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
|
addRowButton.disable();
|
||||||
|
//Group
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
replaceByExternalCol.disable();
|
|
||||||
addRowButton.disable();
|
|
||||||
deleteRowButton.disable();
|
|
||||||
deleteDuplicateButton.disable();
|
|
||||||
// Geospatial
|
// Geospatial
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
|
||||||
downscaleCSquareButton.disable();
|
downscaleCSquareButton.disable();
|
||||||
|
oceanAreaButton.disable();
|
||||||
// Geometry
|
// Geometry
|
||||||
pointButton.disable();
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
// Table
|
// Tools
|
||||||
|
replaceButton.enable();
|
||||||
|
deleteButton.enable();
|
||||||
|
filterButton.enable();
|
||||||
unionButton.enable();
|
unionButton.enable();
|
||||||
|
addRowButton.enable();
|
||||||
|
//Group
|
||||||
groupbyButton.enable();
|
groupbyButton.enable();
|
||||||
timeAggregationButton.enable();
|
timeAggregationButton.enable();
|
||||||
replaceByExternalCol.enable();
|
|
||||||
addRowButton.enable();
|
|
||||||
deleteRowButton.enable();
|
|
||||||
deleteDuplicateButton.enable();
|
|
||||||
// Geospatial
|
// Geospatial
|
||||||
csquareButton.enable();
|
csquareButton.enable();
|
||||||
oceanAreaButton.enable();
|
|
||||||
downscaleCSquareButton.enable();
|
downscaleCSquareButton.enable();
|
||||||
|
oceanAreaButton.enable();
|
||||||
// Geometry
|
// Geometry
|
||||||
pointButton.enable();
|
pointButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
// Table
|
// Tools
|
||||||
|
replaceButton.disable();
|
||||||
|
deleteButton.disable();
|
||||||
|
filterButton.disable();
|
||||||
unionButton.disable();
|
unionButton.disable();
|
||||||
|
addRowButton.disable();
|
||||||
|
//Group
|
||||||
groupbyButton.disable();
|
groupbyButton.disable();
|
||||||
timeAggregationButton.disable();
|
timeAggregationButton.disable();
|
||||||
replaceByExternalCol.disable();
|
|
||||||
addRowButton.disable();
|
|
||||||
deleteRowButton.disable();
|
|
||||||
deleteDuplicateButton.disable();
|
|
||||||
// Geospatial
|
// Geospatial
|
||||||
csquareButton.disable();
|
csquareButton.disable();
|
||||||
oceanAreaButton.disable();
|
|
||||||
downscaleCSquareButton.disable();
|
downscaleCSquareButton.disable();
|
||||||
|
oceanAreaButton.disable();
|
||||||
// Geometry
|
// Geometry
|
||||||
pointButton.disable();
|
pointButton.disable();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class TemplateToolBar {
|
||||||
private TextButton templateNewButton;
|
private TextButton templateNewButton;
|
||||||
private TextButton templateOpenButton;
|
private TextButton templateOpenButton;
|
||||||
private TextButton templateDeleteButton;
|
private TextButton templateDeleteButton;
|
||||||
|
private TextButton templateApplyButton;
|
||||||
|
|
||||||
|
|
||||||
public TemplateToolBar(EventBus eventBus) {
|
public TemplateToolBar(EventBus eventBus) {
|
||||||
|
@ -121,6 +122,24 @@ public class TemplateToolBar {
|
||||||
templateLayout.setWidget(0, 2, templateDeleteButton);
|
templateLayout.setWidget(0, 2, templateDeleteButton);
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
|
templateApplyButton = new TextButton("Apply",
|
||||||
|
TabularDataResources.INSTANCE.templateApply32());
|
||||||
|
templateApplyButton.disable();
|
||||||
|
templateApplyButton.setScale(ButtonScale.LARGE);
|
||||||
|
templateApplyButton.setIconAlign(IconAlign.TOP);
|
||||||
|
templateApplyButton.setToolTip("Apply Template");
|
||||||
|
templateApplyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
templateApplyButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.TEMPLATE_APPLY));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
templateLayout.setWidget(0, 3, templateApplyButton);
|
||||||
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
cleanCells(templateLayout.getElement());
|
cleanCells(templateLayout.getElement());
|
||||||
|
|
||||||
eventBus.addHandler(UIStateEvent.TYPE,
|
eventBus.addHandler(UIStateEvent.TYPE,
|
||||||
|
@ -153,12 +172,14 @@ public class TemplateToolBar {
|
||||||
templateOpenButton.enable();
|
templateOpenButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
|
templateApplyButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
templateOpenButton.enable();
|
templateOpenButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
|
templateApplyButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
|
@ -166,11 +187,13 @@ public class TemplateToolBar {
|
||||||
templateOpenButton.enable();
|
templateOpenButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
|
templateApplyButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
templateOpenButton.disable();
|
templateOpenButton.disable();
|
||||||
templateNewButton.disable();
|
templateNewButton.disable();
|
||||||
templateDeleteButton.disable();
|
templateDeleteButton.disable();
|
||||||
|
templateApplyButton.disable();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 773 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 849 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 879 B |
After Width: | Height: | Size: 1.9 KiB |
|
@ -76,18 +76,18 @@
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||||
|
|
||||||
<!--
|
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
||||||
<set-property name="log_DivLogger" value="ENABLED" />
|
<set-property name="log_DivLogger" value="ENABLED" />
|
||||||
<set-property name="log_GWTLogger" value="ENABLED" />
|
<set-property name="log_GWTLogger" value="ENABLED" />
|
||||||
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
<set-property name="log_SystemLogger" value="ENABLED" />
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" /> -->
|
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" /> -->
|
||||||
|
|
||||||
|
<!--
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" /> -->
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED" /> -->
|
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED" /> -->
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
|
|