Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@93543 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-26 10:00:10 +00:00
parent 605fce7c08
commit 2bf9bbd551
12 changed files with 59 additions and 23 deletions

View File

@ -97,6 +97,29 @@ public class GridContextMenu {
}
});
tableContextMenu.add(deleteRowItem);
MenuItem replaceRowsItem = new MenuItem("Replace");
replaceRowsItem.setId(GridOperationId.REPLACE.toString());
replaceRowsItem.setIcon(TabularDataResources.INSTANCE.columnReplace());
replaceRowsItem.addSelectionHandler(new SelectionHandler<Item>() {
@Override
public void onSelection(SelectionEvent<Item> event) {
Log.debug("gridPanel is: " + gridPanel);
if (gridPanel != null) {
if (gridPanel != null) {
ArrayList<String> rows=gridPanel.getSelectedRowsId();
GridContextMenuItemEvent eventGridContextMenu = new GridContextMenuItemEvent(
GridOperationId.REPLACE, rows);
eventBus.fireEvent(eventGridContextMenu);
}
}
}
});
tableContextMenu.add(replaceRowsItem);
}

View File

@ -216,6 +216,19 @@ public interface TabularDataResources extends ClientBundle {
@Source("column-values.png")
ImageResource columnValues();
@Source("column-replace.png")
ImageResource columnReplace();
@Source("column-replace_32.png")
ImageResource columnReplace32();
@Source("column-replace-batch.png")
ImageResource columnReplaceBatch();
@Source("column-replace-batch_32.png")
ImageResource columnReplaceBatch32();
@Source("column_32.png")
ImageResource column32();

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -46,7 +46,7 @@ public class AnalyseToolBar {
protected TextButton deleteDuplicateButton;
protected TextButton annotationButton;
protected TextButton filterColumnButton;
protected TextButton replaceValueButton;
protected TextButton replaceValueBatchButton;
public AnalyseToolBar(EventBus eventBus) {
this.eventBus = eventBus;
@ -240,14 +240,14 @@ public class AnalyseToolBar {
columnLayout.setWidget(0, 0, filterColumnButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
replaceValueButton = new TextButton("Replace Batch",
TabularDataResources.INSTANCE.columnValues32());
replaceValueButton.setScale(ButtonScale.LARGE);
replaceValueButton.setIconAlign(IconAlign.TOP);
replaceValueButton
replaceValueBatchButton = new TextButton("Replace Batch",
TabularDataResources.INSTANCE.columnReplaceBatch32());
replaceValueBatchButton.setScale(ButtonScale.LARGE);
replaceValueBatchButton.setIconAlign(IconAlign.TOP);
replaceValueBatchButton
.setToolTip("Replace column values in batch");
replaceValueButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
replaceValueButton.addSelectHandler(new SelectHandler() {
replaceValueBatchButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
replaceValueBatchButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
@ -255,7 +255,7 @@ public class AnalyseToolBar {
}
});
columnLayout.setWidget(0, 1, replaceValueButton);
columnLayout.setWidget(0, 1, replaceValueBatchButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
cleanCells(columnLayout.getElement());

View File

@ -45,7 +45,7 @@ public class ModifyToolBar {
// Column
protected TextButton filterColumnButton;
protected TextButton replaceValueButton;
protected TextButton replaceValueBatchButton;
public ModifyToolBar(EventBus eventBus) {
@ -250,16 +250,16 @@ public class ModifyToolBar {
columnLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
replaceValueButton = new TextButton("Replace Batch",
TabularDataResources.INSTANCE.columnValues32());
replaceValueButton.disable();
replaceValueButton.setScale(ButtonScale.LARGE);
replaceValueButton.setIconAlign(IconAlign.TOP);
replaceValueButton
replaceValueBatchButton = new TextButton("Replace Batch",
TabularDataResources.INSTANCE.columnReplaceBatch32());
replaceValueBatchButton.disable();
replaceValueBatchButton.setScale(ButtonScale.LARGE);
replaceValueBatchButton.setIconAlign(IconAlign.TOP);
replaceValueBatchButton
.setToolTip("Replace column values in batch");
replaceValueButton
replaceValueBatchButton
.setArrowAlign(ButtonArrowAlign.BOTTOM);
replaceValueButton
replaceValueBatchButton
.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -267,7 +267,7 @@ public class ModifyToolBar {
}
});
columnLayout.setWidget(0, 1, replaceValueButton);
columnLayout.setWidget(0, 1, replaceValueBatchButton);
columnLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
cleanCells(columnLayout.getElement());
@ -311,7 +311,7 @@ public class ModifyToolBar {
annotationButton.disable();
// Column
filterColumnButton.disable();
replaceValueButton.disable();
replaceValueBatchButton.disable();
break;
case TR_CLOSE:
// Table
@ -325,7 +325,7 @@ public class ModifyToolBar {
annotationButton.disable();
// Column
filterColumnButton.disable();
replaceValueButton.disable();
replaceValueBatchButton.disable();
break;
case TR_OPEN:
// Table
@ -339,7 +339,7 @@ public class ModifyToolBar {
annotationButton.disable();
// Column
filterColumnButton.disable();
replaceValueButton.disable();
replaceValueBatchButton.disable();
break;
case WIZARD_OPEN:
// Table
@ -353,7 +353,7 @@ public class ModifyToolBar {
annotationButton.disable();
// Column
filterColumnButton.disable();
replaceValueButton.disable();
replaceValueBatchButton.disable();
break;
default:
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB