Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@90784 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a92adcd719
commit
9386381221
|
@ -267,4 +267,28 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
@Source("template-edit.png")
|
@Source("template-edit.png")
|
||||||
ImageResource templateEdit();
|
ImageResource templateEdit();
|
||||||
|
|
||||||
|
@Source("timeline_32.png")
|
||||||
|
ImageResource timeline32();
|
||||||
|
|
||||||
|
@Source("timeline.png")
|
||||||
|
ImageResource timeline();
|
||||||
|
|
||||||
|
@Source("wrench-manage_32.png")
|
||||||
|
ImageResource wrenchManage32();
|
||||||
|
|
||||||
|
@Source("wrench-manage.png")
|
||||||
|
ImageResource wrenchManage();
|
||||||
|
|
||||||
|
@Source("table-duplicate-rows_32.png")
|
||||||
|
ImageResource tableDuplicateRows32();
|
||||||
|
|
||||||
|
@Source("table-duplicate-rows.png")
|
||||||
|
ImageResource tableDuplicateRows();
|
||||||
|
|
||||||
|
@Source("table-duplicate-rows-remove_32.png")
|
||||||
|
ImageResource tableDuplicateRowsRemove32();
|
||||||
|
|
||||||
|
@Source("table-duplicate-rows-remove.png")
|
||||||
|
ImageResource tableDuplicateRowsRemove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,11 @@ public class CurationToolBar {
|
||||||
protected ToolBar toolBar;
|
protected ToolBar toolBar;
|
||||||
|
|
||||||
protected TextButton btn;
|
protected TextButton btn;
|
||||||
protected TextButton validationButton;
|
protected TextButton duplicateDetectionButton;
|
||||||
protected TextButton rulesButton;
|
protected TextButton rulesButton;
|
||||||
protected TextButton operationsButton;
|
protected TextButton normalizeButton;
|
||||||
protected TextButton manageRulesButton;
|
protected TextButton manageRulesButton;
|
||||||
|
private TextButton applyTemplateButton;
|
||||||
|
|
||||||
public CurationToolBar(EventBus eventBus) {
|
public CurationToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
@ -80,7 +81,7 @@ public class CurationToolBar {
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
validationLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
manageRulesButton = new TextButton("Manage Rules",
|
manageRulesButton = new TextButton("Manage Rules",
|
||||||
TabularDataResources.INSTANCE.rules32());
|
TabularDataResources.INSTANCE.wrenchManage32());
|
||||||
manageRulesButton.setScale(ButtonScale.LARGE);
|
manageRulesButton.setScale(ButtonScale.LARGE);
|
||||||
manageRulesButton.setIconAlign(IconAlign.TOP);
|
manageRulesButton.setIconAlign(IconAlign.TOP);
|
||||||
manageRulesButton.setToolTip("View defined rules and apply");
|
manageRulesButton.setToolTip("View defined rules and apply");
|
||||||
|
@ -97,13 +98,13 @@ public class CurationToolBar {
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
validationLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
validationButton = new TextButton("Show Validation",
|
duplicateDetectionButton = new TextButton("Duplicate Detection",
|
||||||
TabularDataResources.INSTANCE.validation32());
|
TabularDataResources.INSTANCE.tableDuplicateRows32());
|
||||||
validationButton.setScale(ButtonScale.LARGE);
|
duplicateDetectionButton.setScale(ButtonScale.LARGE);
|
||||||
validationButton.setIconAlign(IconAlign.TOP);
|
duplicateDetectionButton.setIconAlign(IconAlign.TOP);
|
||||||
validationButton.setToolTip("Show validation outcome on table");
|
duplicateDetectionButton.setToolTip("Detects duplicate lines in the table");
|
||||||
validationButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
duplicateDetectionButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
validationButton.addSelectHandler(new SelectHandler() {
|
duplicateDetectionButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
// eventBus.fireEvent(new
|
// eventBus.fireEvent(new
|
||||||
|
@ -111,29 +112,46 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
validationLayout.setWidget(0, 3, validationButton);
|
validationLayout.setWidget(0, 3, duplicateDetectionButton);
|
||||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
validationLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
applyTemplateButton = new TextButton("Apply Template",
|
||||||
|
TabularDataResources.INSTANCE.tableDuplicateRows32());
|
||||||
|
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
|
||||||
|
// ImportTableEvent(ImportTableType.JSON));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
validationLayout.setWidget(0, 4, applyTemplateButton);
|
||||||
|
validationLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||||
|
|
||||||
cleanCells(validationLayout.getElement());
|
cleanCells(validationLayout.getElement());
|
||||||
|
|
||||||
// Operations
|
// Structure
|
||||||
ButtonGroup operationsGroup = new ButtonGroup();
|
ButtonGroup structureGroup = new ButtonGroup();
|
||||||
operationsGroup.setId("Operations");
|
structureGroup.setId("Structure");
|
||||||
operationsGroup.setStyleName("ribbon");
|
structureGroup.setStyleName("ribbon");
|
||||||
operationsGroup.setHeadingText("Operations");
|
structureGroup.setHeadingText("Structure");
|
||||||
operationsGroup.disable();
|
structureGroup.disable();
|
||||||
toolBar.add(operationsGroup);
|
toolBar.add(structureGroup);
|
||||||
|
|
||||||
FlexTable operationsLayout = new FlexTable();
|
FlexTable structureLayout = new FlexTable();
|
||||||
operationsGroup.add(operationsLayout);
|
structureGroup.add(structureLayout);
|
||||||
|
|
||||||
operationsButton = new TextButton("Review Operations",
|
normalizeButton = new TextButton("Normalize",
|
||||||
TabularDataResources.INSTANCE.cog32());
|
TabularDataResources.INSTANCE.cog32());
|
||||||
operationsButton.setScale(ButtonScale.LARGE);
|
normalizeButton.setScale(ButtonScale.LARGE);
|
||||||
operationsButton.setIconAlign(IconAlign.TOP);
|
normalizeButton.setIconAlign(IconAlign.TOP);
|
||||||
operationsButton.setToolTip("View performed operations");
|
normalizeButton.setToolTip("Normalize");
|
||||||
operationsButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
normalizeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
operationsButton.addSelectHandler(new SelectHandler() {
|
normalizeButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
// eventBus.fireEvent(new
|
// eventBus.fireEvent(new
|
||||||
|
@ -141,12 +159,12 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
operationsLayout.setWidget(0, 1, operationsButton);
|
structureLayout.setWidget(0, 1, normalizeButton);
|
||||||
operationsLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cleanCells(operationsLayout.getElement());
|
cleanCells(structureLayout.getElement());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ public class FileToolBar {
|
||||||
taskGroup.add(taskLayout);
|
taskGroup.add(taskLayout);
|
||||||
|
|
||||||
timelineButton = new TextButton("Timeline",
|
timelineButton = new TextButton("Timeline",
|
||||||
TabularDataResources.INSTANCE.template32());
|
TabularDataResources.INSTANCE.timeline32());
|
||||||
timelineButton.disable();
|
timelineButton.disable();
|
||||||
timelineButton.setToolTip("Timeline");
|
timelineButton.setToolTip("Timeline");
|
||||||
timelineButton.setScale(ButtonScale.LARGE);
|
timelineButton.setScale(ButtonScale.LARGE);
|
||||||
|
|
Loading…
Reference in New Issue