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:
|
||||
openJSONExportWizard();
|
||||
break;
|
||||
case TEMPLATE_OPEN:
|
||||
openTemplateOpen();
|
||||
break;
|
||||
case TEMPLATE_NEW:
|
||||
openTemplateNew();
|
||||
break;
|
||||
case TEMPLATE_DELETE:
|
||||
openTemplateDelete();
|
||||
break;
|
||||
case SHARE:
|
||||
openShareWindow();
|
||||
break;
|
||||
|
@ -802,9 +793,6 @@ public class TabularDataController {
|
|||
case DUPLICATE_DETECTION:
|
||||
openDuplicatesRows();
|
||||
break;
|
||||
case TEMPLATE_APPLY:
|
||||
openTemplateApply();
|
||||
break;
|
||||
case TABLE_TYPE:
|
||||
openTableType();
|
||||
break;
|
||||
|
@ -843,7 +831,29 @@ public class TabularDataController {
|
|||
break;
|
||||
case GENERATE_SUMMARY:
|
||||
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;
|
||||
case TABLE_UNION:
|
||||
openTableUnionWizard();
|
||||
|
@ -856,18 +866,6 @@ public class TabularDataController {
|
|||
break;
|
||||
case TABLE_AGGREAGETE:
|
||||
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:
|
||||
openGeospatialCSquare();
|
||||
break;
|
||||
|
@ -882,11 +880,20 @@ public class TabularDataController {
|
|||
break;
|
||||
case ANNOTATION_ADD:
|
||||
break;
|
||||
case COLUMN_FILTER:
|
||||
openMultiColumnFilter();
|
||||
break;
|
||||
case COLUMN_BATCH_REPLACE:
|
||||
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:
|
||||
break;
|
||||
case ANALYSE_TABLE_UNION:
|
||||
|
@ -921,6 +928,7 @@ public class TabularDataController {
|
|||
case CREATE_GIS_MAP:
|
||||
openCreateMapWizard();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1680,6 +1688,7 @@ public class TabularDataController {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void openMultiColumnFilter() {
|
||||
Log.debug("Request Open Multi Column Filter Dialog");
|
||||
if (trId != null) {
|
||||
|
@ -1692,6 +1701,11 @@ public class TabularDataController {
|
|||
}
|
||||
}
|
||||
|
||||
private void openColumnFilter(){
|
||||
openColumnFilter(null,null);
|
||||
}
|
||||
|
||||
|
||||
private void openColumnFilter(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Open Column Filter Dialog");
|
||||
if (trId != null) {
|
||||
|
|
|
@ -228,6 +228,12 @@ public interface TabularDataResources extends ClientBundle {
|
|||
@Source("column-replace_32.png")
|
||||
ImageResource columnReplace32();
|
||||
|
||||
@Source("column-replace-all.png")
|
||||
ImageResource columnReplaceAll();
|
||||
|
||||
@Source("column-replace-all_32.png")
|
||||
ImageResource columnReplaceAll32();
|
||||
|
||||
@Source("column-replace-batch.png")
|
||||
ImageResource columnReplaceBatch();
|
||||
|
||||
|
@ -277,10 +283,28 @@ public interface TabularDataResources extends ClientBundle {
|
|||
ImageResource rowInsert();
|
||||
|
||||
@Source("table-row-delete_32.png")
|
||||
ImageResource rowRemove32();
|
||||
ImageResource tableRowDelete32();
|
||||
|
||||
@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")
|
||||
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,9 +38,6 @@ public class CurationToolBar {
|
|||
|
||||
//Validation
|
||||
private TextButton duplicateDetectionButton;
|
||||
private TextButton applyTemplateButton;
|
||||
//private TextButton rulesButton;
|
||||
//private TextButton manageRulesButton;
|
||||
|
||||
//Structure
|
||||
private TextButton tableTypeButton;
|
||||
|
@ -84,41 +81,7 @@ public class CurationToolBar {
|
|||
|
||||
FlexTable validationLayout = new FlexTable();
|
||||
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",
|
||||
TabularDataResources.INSTANCE.tableDuplicateRows32());
|
||||
|
@ -139,22 +102,7 @@ public class CurationToolBar {
|
|||
validationLayout.setWidget(0, 0, duplicateDetectionButton);
|
||||
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());
|
||||
|
||||
|
@ -438,9 +386,6 @@ public class CurationToolBar {
|
|||
switch (uiStateType) {
|
||||
case START:
|
||||
duplicateDetectionButton.disable();
|
||||
applyTemplateButton.disable();
|
||||
//rulesButton.disable();
|
||||
//manageRulesButton.disable();
|
||||
|
||||
tableTypeButton.disable();
|
||||
changePositionColumnButton.disable();
|
||||
|
@ -461,9 +406,6 @@ public class CurationToolBar {
|
|||
case TR_CLOSE:
|
||||
case TR_READONLY:
|
||||
duplicateDetectionButton.disable();
|
||||
applyTemplateButton.disable();
|
||||
//rulesButton.disable();
|
||||
//manageRulesButton.disable();
|
||||
|
||||
tableTypeButton.disable();
|
||||
changePositionColumnButton.disable();
|
||||
|
@ -484,9 +426,6 @@ public class CurationToolBar {
|
|||
case TABLEUPDATE:
|
||||
case TABLECURATION:
|
||||
duplicateDetectionButton.enable();
|
||||
//rulesButton.disable();
|
||||
//manageRulesButton.disable();
|
||||
applyTemplateButton.enable();
|
||||
|
||||
tableTypeButton.enable();
|
||||
changePositionColumnButton.enable();
|
||||
|
@ -511,9 +450,6 @@ public class CurationToolBar {
|
|||
break;
|
||||
case WIZARD_OPEN:
|
||||
duplicateDetectionButton.disable();
|
||||
applyTemplateButton.disable();
|
||||
//rulesButton.disable();
|
||||
//manageRulesButton.disable();
|
||||
|
||||
tableTypeButton.disable();
|
||||
changePositionColumnButton.disable();
|
||||
|
|
|
@ -81,9 +81,9 @@ public class FileToolBar {
|
|||
|
||||
// File
|
||||
ButtonGroup fileGroup = new ButtonGroup();
|
||||
fileGroup.setId("File");
|
||||
fileGroup.setId("Tabular Resource");
|
||||
fileGroup.setStyleName("ribbon");
|
||||
fileGroup.setHeadingText("File");
|
||||
fileGroup.setHeadingText("Tabular Resource");
|
||||
toolBar.add(fileGroup);
|
||||
|
||||
FlexTable fileLayout = new FlexTable();
|
||||
|
@ -151,13 +151,33 @@ public class FileToolBar {
|
|||
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",
|
||||
TabularDataResources.INSTANCE.delete());
|
||||
deleteButton.disable();
|
||||
deleteButton.setId("closeButton");
|
||||
deleteButton.setToolTip("Delete Tabular Resource");
|
||||
|
||||
fileLayout.setWidget(0, 3, deleteButton);
|
||||
fileLayout.setWidget(0, 4, deleteButton);
|
||||
deleteButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -171,7 +191,7 @@ public class FileToolBar {
|
|||
propertiesButton.setId("propertiesButton");
|
||||
propertiesButton.setToolTip("Show properties");
|
||||
|
||||
fileLayout.setWidget(1, 3, propertiesButton);
|
||||
fileLayout.setWidget(1, 4, propertiesButton);
|
||||
propertiesButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
|
@ -291,35 +311,6 @@ public class FileToolBar {
|
|||
exportLayout.setWidget(1, 2, exportJSONButton);
|
||||
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)
|
||||
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.google.gwt.dom.client.Element;
|
||||
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.web.bindery.event.shared.EventBus;
|
||||
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.event.SelectEvent;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -35,14 +40,16 @@ public class ModifyToolBar {
|
|||
private EventBus eventBus;
|
||||
private ToolBar toolBar;
|
||||
|
||||
// Table
|
||||
// Tool
|
||||
private TextButton replaceButton;
|
||||
private TextButton deleteButton;
|
||||
private TextButton filterButton;
|
||||
private TextButton unionButton;
|
||||
private TextButton addRowButton;
|
||||
|
||||
// Group
|
||||
private TextButton groupbyButton;
|
||||
private TextButton timeAggregationButton;
|
||||
private TextButton replaceByExternalCol;
|
||||
private TextButton addRowButton;
|
||||
private TextButton deleteRowButton;
|
||||
private TextButton deleteDuplicateButton;
|
||||
|
||||
// Geospatial
|
||||
private TextButton csquareButton;
|
||||
|
@ -52,6 +59,18 @@ public class ModifyToolBar {
|
|||
// Geometry
|
||||
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) {
|
||||
this.eventBus = eventBus;
|
||||
build();
|
||||
|
@ -66,16 +85,77 @@ public class ModifyToolBar {
|
|||
toolBar.setSpacing(1);
|
||||
toolBar.setEnableOverflow(false);
|
||||
|
||||
// Table Group
|
||||
ButtonGroup tableGroup = new ButtonGroup();
|
||||
tableGroup.setId("Table");
|
||||
tableGroup.setStyleName("ribbon");
|
||||
tableGroup.setHeadingText("Table");
|
||||
tableGroup.enable();
|
||||
toolBar.add(tableGroup);
|
||||
// Tools Group
|
||||
ButtonGroup toolsGroup = new ButtonGroup();
|
||||
toolsGroup.setId("Tools");
|
||||
toolsGroup.setStyleName("ribbon");
|
||||
toolsGroup.setHeadingText("Tools");
|
||||
toolsGroup.enable();
|
||||
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",
|
||||
TabularDataResources.INSTANCE.union32());
|
||||
unionButton.disable();
|
||||
|
@ -90,8 +170,21 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 1, unionButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
toolsLayout.setWidget(0, 4, unionButton);
|
||||
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",
|
||||
TabularDataResources.INSTANCE.group32());
|
||||
|
@ -107,8 +200,8 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 2, groupbyButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
groupLayout.setWidget(0, 0, groupbyButton);
|
||||
groupLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
timeAggregationButton = new TextButton("Time Aggregation",
|
||||
TabularDataResources.INSTANCE.timeAggregate32());
|
||||
|
@ -125,78 +218,9 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 3, timeAggregationButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
|
||||
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());
|
||||
groupLayout.setWidget(0, 1, timeAggregationButton);
|
||||
groupLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
cleanCells(groupLayout.getElement());
|
||||
|
||||
// Geospatial Group
|
||||
ButtonGroup geospatialGroup = new ButtonGroup();
|
||||
|
@ -228,6 +252,24 @@ public class ModifyToolBar {
|
|||
geospatialLayout.setWidget(0, 0, csquareButton);
|
||||
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",
|
||||
TabularDataResources.INSTANCE.geospatialOceanArea32());
|
||||
oceanAreaButton.disable();
|
||||
|
@ -243,26 +285,7 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
geospatialLayout.setWidget(0, 1, 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.setWidget(0, 2, oceanAreaButton);
|
||||
geospatialLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
|
||||
cleanCells(geospatialLayout.getElement());
|
||||
|
@ -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) {
|
||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||
for (int i = 0; i < tds.getLength(); i++) {
|
||||
|
@ -320,74 +436,80 @@ public class ModifyToolBar {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setUI(UIStateEvent event) {
|
||||
UIStateType uiStateType = event.getUIStateType();
|
||||
try {
|
||||
switch (uiStateType) {
|
||||
case START:
|
||||
// Table
|
||||
// Tools
|
||||
replaceButton.disable();
|
||||
deleteButton.disable();
|
||||
filterButton.disable();
|
||||
unionButton.disable();
|
||||
addRowButton.disable();
|
||||
//Group
|
||||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
// Geospatial
|
||||
csquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
downscaleCSquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
// Geometry
|
||||
pointButton.disable();
|
||||
break;
|
||||
case TR_CLOSE:
|
||||
case TR_READONLY:
|
||||
// Table
|
||||
// Tools
|
||||
replaceButton.disable();
|
||||
deleteButton.disable();
|
||||
filterButton.disable();
|
||||
unionButton.disable();
|
||||
addRowButton.disable();
|
||||
//Group
|
||||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
// Geospatial
|
||||
csquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
downscaleCSquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
// Geometry
|
||||
pointButton.disable();
|
||||
break;
|
||||
case TR_OPEN:
|
||||
case TABLEUPDATE:
|
||||
case TABLECURATION:
|
||||
// Table
|
||||
// Tools
|
||||
replaceButton.enable();
|
||||
deleteButton.enable();
|
||||
filterButton.enable();
|
||||
unionButton.enable();
|
||||
addRowButton.enable();
|
||||
//Group
|
||||
groupbyButton.enable();
|
||||
timeAggregationButton.enable();
|
||||
replaceByExternalCol.enable();
|
||||
addRowButton.enable();
|
||||
deleteRowButton.enable();
|
||||
deleteDuplicateButton.enable();
|
||||
// Geospatial
|
||||
csquareButton.enable();
|
||||
oceanAreaButton.enable();
|
||||
downscaleCSquareButton.enable();
|
||||
oceanAreaButton.enable();
|
||||
// Geometry
|
||||
pointButton.enable();
|
||||
break;
|
||||
case WIZARD_OPEN:
|
||||
// Table
|
||||
// Tools
|
||||
replaceButton.disable();
|
||||
deleteButton.disable();
|
||||
filterButton.disable();
|
||||
unionButton.disable();
|
||||
addRowButton.disable();
|
||||
//Group
|
||||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
// Geospatial
|
||||
csquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
downscaleCSquareButton.disable();
|
||||
oceanAreaButton.disable();
|
||||
// Geometry
|
||||
pointButton.disable();
|
||||
break;
|
||||
|
|
|
@ -39,6 +39,7 @@ public class TemplateToolBar {
|
|||
private TextButton templateNewButton;
|
||||
private TextButton templateOpenButton;
|
||||
private TextButton templateDeleteButton;
|
||||
private TextButton templateApplyButton;
|
||||
|
||||
|
||||
public TemplateToolBar(EventBus eventBus) {
|
||||
|
@ -121,6 +122,24 @@ public class TemplateToolBar {
|
|||
templateLayout.setWidget(0, 2, templateDeleteButton);
|
||||
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());
|
||||
|
||||
eventBus.addHandler(UIStateEvent.TYPE,
|
||||
|
@ -153,12 +172,14 @@ public class TemplateToolBar {
|
|||
templateOpenButton.enable();
|
||||
templateNewButton.enable();
|
||||
templateDeleteButton.enable();
|
||||
templateApplyButton.disable();
|
||||
break;
|
||||
case TR_CLOSE:
|
||||
case TR_READONLY:
|
||||
templateOpenButton.enable();
|
||||
templateNewButton.enable();
|
||||
templateDeleteButton.enable();
|
||||
templateApplyButton.disable();
|
||||
break;
|
||||
case TR_OPEN:
|
||||
case TABLEUPDATE:
|
||||
|
@ -166,11 +187,13 @@ public class TemplateToolBar {
|
|||
templateOpenButton.enable();
|
||||
templateNewButton.enable();
|
||||
templateDeleteButton.enable();
|
||||
templateApplyButton.enable();
|
||||
break;
|
||||
case WIZARD_OPEN:
|
||||
templateOpenButton.disable();
|
||||
templateNewButton.disable();
|
||||
templateDeleteButton.disable();
|
||||
templateApplyButton.disable();
|
||||
break;
|
||||
default:
|
||||
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. -->
|
||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||
|
||||
<!--
|
||||
|
||||
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
||||
<set-property name="log_DivLogger" 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" /> -->
|
||||
|
||||
|
||||
<!--
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_DivLogger" 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" /> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
|
|