Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@90799 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-01-30 18:30:47 +00:00
parent 4974bebfa6
commit 4c33bbc6ec
2 changed files with 108 additions and 93 deletions

View File

@ -43,8 +43,8 @@ public class CurationToolBar {
protected TextButton tableTypeButton;
protected TextButton addColumnButton;
protected TextButton deleteColumnButton;
private TextButton extractCodelistButton;
private TextButton generateSummaryButton;
protected TextButton extractCodelistButton;
protected TextButton generateSummaryButton;
public CurationToolBar(EventBus eventBus) {
this.eventBus = eventBus;
@ -188,7 +188,7 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
columnTypeButton = new TextButton("Column Type",
TabularDataResources.INSTANCE.columnLabel32());
TabularDataResources.INSTANCE.columnType32());
columnTypeButton.setScale(ButtonScale.LARGE);
columnTypeButton.setIconAlign(IconAlign.TOP);
columnTypeButton.setToolTip("Change column type");
@ -222,7 +222,7 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
deleteColumnButton = new TextButton("Delete Column",
TabularDataResources.INSTANCE.columnLabel32());
TabularDataResources.INSTANCE.columnDelete32());
deleteColumnButton.setScale(ButtonScale.LARGE);
deleteColumnButton.setIconAlign(IconAlign.TOP);
deleteColumnButton.setToolTip("Delete column");

View File

@ -39,9 +39,14 @@ public class ModifyToolBar {
protected TextButton removeColumnButton;
protected TextButton changeColumnTypeButton;
protected TextButton filterColumnButton;
protected TextButton modifyColumnValuesOnConditionButton;
protected TextButton editColumnValueOnConditionButton;
protected TextButton addAnnotationColumnButton;
protected TextButton validateColumnDuplicateButton;
protected TextButton aggregateButton;
protected TextButton addRowButton;
protected TextButton deleteRowButton;
protected TextButton annotationButton;
private TextButton deleteDuplicateButton;
@ -121,6 +126,93 @@ public class ModifyToolBar {
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
// ImportTableEvent(ImportTableType.JSON));
}
});
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
// ImportTableEvent(ImportTableType.JSON));
}
});
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
// ImportTableEvent(ImportTableType.JSON));
}
});
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
// ImportTableEvent(ImportTableType.JSON));
}
});
tableLayout.setWidget(0, 6, deleteDuplicateButton);
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
annotationButton = new TextButton("Annotation",
TabularDataResources.INSTANCE.column32());
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
// ImportTableEvent(ImportTableType.JSON));
}
});
tableLayout.setWidget(0, 7, annotationButton);
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
cleanCells(tableLayout.getElement());
// Column Group
@ -135,41 +227,6 @@ public class ModifyToolBar {
columnGroup.add(columnLayout);
removeColumnButton = new TextButton("Remove",
TabularDataResources.INSTANCE.columnDelete32());
removeColumnButton.setScale(ButtonScale.LARGE);
removeColumnButton.setIconAlign(IconAlign.TOP);
removeColumnButton.setToolTip("Change column type");
removeColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
removeColumnButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
// ImportTableEvent(ImportTableType.JSON));
}
});
columnLayout.setWidget(0, 1, removeColumnButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
changeColumnTypeButton = new TextButton("Type",
TabularDataResources.INSTANCE.columnType32());
changeColumnTypeButton.setScale(ButtonScale.LARGE);
changeColumnTypeButton.setIconAlign(IconAlign.TOP);
changeColumnTypeButton.setToolTip("Change column type");
changeColumnTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
changeColumnTypeButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
// ImportTableEvent(ImportTableType.JSON));
}
});
columnLayout.setWidget(0, 1, changeColumnTypeButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
filterColumnButton = new TextButton("Filter",
TabularDataResources.INSTANCE.columnFilter32());
filterColumnButton.setScale(ButtonScale.LARGE);
@ -187,19 +244,19 @@ public class ModifyToolBar {
}
});
columnLayout.setWidget(0, 3, filterColumnButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
columnLayout.setWidget(0, 0, filterColumnButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
modifyColumnValuesOnConditionButton = new TextButton("Values",
editColumnValueOnConditionButton = new TextButton("Edit",
TabularDataResources.INSTANCE.columnValues32());
modifyColumnValuesOnConditionButton.setScale(ButtonScale.LARGE);
modifyColumnValuesOnConditionButton.setIconAlign(IconAlign.TOP);
modifyColumnValuesOnConditionButton
.setToolTip("Modify column values according to an condition");
modifyColumnValuesOnConditionButton
editColumnValueOnConditionButton.setScale(ButtonScale.LARGE);
editColumnValueOnConditionButton.setIconAlign(IconAlign.TOP);
editColumnValueOnConditionButton
.setToolTip("Edit column values according to an condition");
editColumnValueOnConditionButton
.setArrowAlign(ButtonArrowAlign.BOTTOM);
modifyColumnValuesOnConditionButton
editColumnValueOnConditionButton
.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -208,50 +265,8 @@ public class ModifyToolBar {
}
});
columnLayout.setWidget(0, 4, modifyColumnValuesOnConditionButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
addAnnotationColumnButton = new TextButton("Annotation",
TabularDataResources.INSTANCE.columnAdd32());
addAnnotationColumnButton.setScale(ButtonScale.LARGE);
addAnnotationColumnButton.setIconAlign(IconAlign.TOP);
addAnnotationColumnButton
.setToolTip("Add annotation column");
addAnnotationColumnButton
.setArrowAlign(ButtonArrowAlign.BOTTOM);
addAnnotationColumnButton
.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
// ImportTableEvent(ImportTableType.JSON));
}
});
columnLayout.setWidget(0, 5, addAnnotationColumnButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
validateColumnDuplicateButton = new TextButton("Duplicate",
TabularDataResources.INSTANCE.validateAdd32());
validateColumnDuplicateButton.setScale(ButtonScale.LARGE);
validateColumnDuplicateButton.setIconAlign(IconAlign.TOP);
validateColumnDuplicateButton
.setToolTip("Validate column duplicate");
validateColumnDuplicateButton
.setArrowAlign(ButtonArrowAlign.BOTTOM);
validateColumnDuplicateButton
.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
// ImportTableEvent(ImportTableType.JSON));
}
});
columnLayout.setWidget(0, 6, validateColumnDuplicateButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
columnLayout.setWidget(0, 1, editColumnValueOnConditionButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
cleanCells(columnLayout.getElement());