diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 516834d..e1fa0a5 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -7,6 +7,9 @@
uses
+
+ uses
+
uses
diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
index c915bbe..38a95c3 100644
--- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
+++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
@@ -53,7 +53,7 @@ public class TabularDataController {
protected UIStateType uiState = UIStateType.START;
protected TdTaskController tdTaskController;
-
+
protected ContentPanel toolBoxPanel;
protected BorderLayoutData westData;
@@ -114,8 +114,7 @@ public class TabularDataController {
}
});
-
-
+
eventBus.addHandler(RibbonEvent.TYPE,
new RibbonEvent.RibbonEventHandler() {
@@ -125,26 +124,20 @@ public class TabularDataController {
}
});
- eventBus.addHandler(
- TasksMonitorEvent.TYPE,
+ eventBus.addHandler(TasksMonitorEvent.TYPE,
new TasksMonitorEvent.TasksMonitorEventHandler() {
- public void onTasksMonitorEvent(
- TasksMonitorEvent event) {
+ public void onTasksMonitorEvent(TasksMonitorEvent event) {
Log.debug("Catch Event HeaderColumnMenuItemEvent");
doTasksMonitorCommand(event);
}
-
});
-
-
+
eventBus.fireEvent(new UIStateEvent(UIStateType.START));
}
-
-
protected void alertMessage(String reason, String details) {
AlertMessageBox d = new AlertMessageBox(reason, details);
@@ -185,8 +178,7 @@ public class TabularDataController {
uiStateEvent.setTrId(tabularResourceId);
eventBus.fireEvent(uiStateEvent);
}
-
-
+
/*
* protected void updateUIProperties(){ if (uiToolBox == UIToolBox.OPENED) {
* trProperties.update(); } }
@@ -197,13 +189,13 @@ public class TabularDataController {
Log.debug("CloseTabularResource Open");
tabularData.closeTable();
trId = null;
- tableOpening=null;
+ tableOpening = null;
uiState = UIStateType.TR_CLOSE;
Log.debug("fireEvent TR_CLOSE");
try {
eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE));
} catch (Exception e) {
- Log.debug("Bus Error: "+e.getMessage());
+ Log.debug("Bus Error: " + e.getMessage());
}
}
}
@@ -234,7 +226,7 @@ public class TabularDataController {
RibbonType type = event.getRibbonType();
Log.trace("doRibbonEvent ribbonType: " + type);
try {
- switch (type) {
+ switch (type) {
case OPEN:
openTabularResource();
break;
@@ -371,17 +363,18 @@ public class TabularDataController {
}
}
- protected void doTasksMonitorCommand(TasksMonitorEvent event){
- TaskType taskType=event.getTaskType();
- Log.debug("Received TaskMonitorEvent: "+taskType);
+ protected void doTasksMonitorCommand(TasksMonitorEvent event) {
+ TaskType taskType = event.getTaskType();
+ Log.debug("Received TaskMonitorEvent: " + taskType);
switch (taskType) {
case OPENTABLE:
- //openTable(event.getTrId());
+ // openTable(event.getTrId());
break;
default:
break;
}
}
+
/*
* protected void openToolBox() { if (uiState == UIStateType.TR_OPEN) { if
* (uiToolBox == UIToolBox.OPENED) { toolBoxPanel.collapse();
@@ -578,27 +571,25 @@ public class TabularDataController {
}
-
protected com.extjs.gxt.ui.client.widget.Window tdTaskMainWindow;
- protected void openTasksManagerWizard() {
+ protected void openTasksManagerWizard() {
tdTaskMainWindow.setPosition((Window.getClientWidth() / 2) - 200,
(Window.getClientHeight() / 2) - 300);
tdTaskController.updateTasks(true);
tdTaskMainWindow.show();
}
-
-
-
- protected void openColumnTYPE(){
+
+ protected void openColumnTYPE() {
Log.debug("Request Open Change Column Tab");
- if(trId!=null){
- WidgetRequestEvent e= new WidgetRequestEvent(WidgetRequestType.CHANGECOLUMNTYPEPANEL);
+ if (trId != null) {
+ WidgetRequestEvent e = new WidgetRequestEvent(
+ WidgetRequestType.CHANGECOLUMNTYPEPANEL);
e.setTrId(trId);
eventBus.fireEvent(e);
}
}
-
+
protected void doGridHeaderColumnMenuCommand(
GridHeaderColumnMenuItemEvent event) {
Log.debug("GridHeaderColumnMenu Fire Event",
@@ -608,41 +599,35 @@ public class TabularDataController {
String columnName = tabularData.getColumnId(event.getColumnSelected());
Log.debug("GridColumnName: " + columnName);
- if (opId.compareTo(GridHeaderOperationId.AddLabel.toString()) == 0) {
+ if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.ChangeLabel.toString()) == 0) {
+ if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.RemoveLabel.toString()) == 0) {
+ if (opId.compareTo(GridHeaderOperationId.COLUMNEDIT.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.RemoveColumn
+ if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.ChangeToType
+ if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
.toString()) == 0) {
-
+ openColumnTYPE();
} else {
- if (opId.compareTo(GridHeaderOperationId.ColumnDuplicateValidation
+ if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.Filter
+ if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.ModifyColumnValueOnCondition
+ if (opId.compareTo(GridHeaderOperationId.DUPLICATEDETECTION
.toString()) == 0) {
} else {
- if (opId.compareTo(GridHeaderOperationId.NewAnnotationColumn
- .toString()) == 0) {
-
- } else {
-
- }
}
diff --git a/src/main/java/org/gcube/portlets/user/td/client/grid/GridContextMenu.java b/src/main/java/org/gcube/portlets/user/td/client/grid/GridContextMenu.java
index c1792bb..325610e 100644
--- a/src/main/java/org/gcube/portlets/user/td/client/grid/GridContextMenu.java
+++ b/src/main/java/org/gcube/portlets/user/td/client/grid/GridContextMenu.java
@@ -19,18 +19,18 @@ public class GridContextMenu {
public GridContextMenu(){
tableContextMenu=new Menu();
- MenuItem editRowItem = new MenuItem("Edit Row");
- editRowItem.setId(GridOperationId.EditRow.toString());
- editRowItem.setIcon(TabularDataResources.INSTANCE.rowEdit());
- tableContextMenu.add(editRowItem);
-
MenuItem addRowItem = new MenuItem("Add Row");
- addRowItem.setId(GridOperationId.EditRow.toString());
+ addRowItem.setId(GridOperationId.ROWADD.toString());
addRowItem.setIcon(TabularDataResources.INSTANCE.rowInsert());
tableContextMenu.add(addRowItem);
+ MenuItem editRowItem = new MenuItem("Edit Row");
+ editRowItem.setId(GridOperationId.ROWEDIT.toString());
+ editRowItem.setIcon(TabularDataResources.INSTANCE.rowEdit());
+ tableContextMenu.add(editRowItem);
+
MenuItem removeRowItem = new MenuItem("Remove Row");
- removeRowItem.setId(GridOperationId.EditRow.toString());
+ removeRowItem.setId(GridOperationId.ROWDELETE.toString());
removeRowItem.setIcon(TabularDataResources.INSTANCE.rowRemove());
tableContextMenu.add(removeRowItem);
diff --git a/src/main/java/org/gcube/portlets/user/td/client/grid/GridHeaderColumnMenu.java b/src/main/java/org/gcube/portlets/user/td/client/grid/GridHeaderColumnMenu.java
index d671959..9188053 100644
--- a/src/main/java/org/gcube/portlets/user/td/client/grid/GridHeaderColumnMenu.java
+++ b/src/main/java/org/gcube/portlets/user/td/client/grid/GridHeaderColumnMenu.java
@@ -24,51 +24,49 @@ public class GridHeaderColumnMenu {
MenuItem changeLabelItem = new MenuItem("Labels");
- changeLabelItem.setId(GridHeaderOperationId.ChangeLabel
+ changeLabelItem.setId(GridHeaderOperationId.COLUMNLABEL
.toString());
changeLabelItem.setIcon(TabularDataResources.INSTANCE.columnLabel());
menuItems.add(changeLabelItem);
MenuItem addColumnItem = new MenuItem("Add Column");
- addColumnItem.setId(GridHeaderOperationId.NewAnnotationColumn.toString());
+ addColumnItem.setId(GridHeaderOperationId.COLUMNADD.toString());
addColumnItem.setIcon(TabularDataResources.INSTANCE.columnAdd());
menuItems.add(addColumnItem);
MenuItem deleteColumnItem = new MenuItem("Delete Column");
- deleteColumnItem.setId(GridHeaderOperationId.RemoveColumn.toString());
+ deleteColumnItem.setId(GridHeaderOperationId.COLUMNDELETE.toString());
deleteColumnItem.setIcon(TabularDataResources.INSTANCE.columnDelete());
menuItems.add(deleteColumnItem);
MenuItem changeToTypeItem = new MenuItem("Change Type");
- changeToTypeItem.setId(GridHeaderOperationId.ChangeToType.toString());
+ changeToTypeItem.setId(GridHeaderOperationId.COLUMNTYPE.toString());
changeToTypeItem.setIcon(TabularDataResources.INSTANCE.columnType());
menuItems.add(changeToTypeItem);
MenuItem filterItem = new MenuItem("Filter");
- filterItem.setId(GridHeaderOperationId.Filter.toString());
+ filterItem.setId(GridHeaderOperationId.COLUMNFILTER.toString());
filterItem.setIcon(TabularDataResources.INSTANCE.columnFilter());
menuItems.add(filterItem);
MenuItem modifyValueOnConditionItem = new MenuItem("Edit");
- modifyValueOnConditionItem.setId(GridHeaderOperationId.ModifyColumnValueOnCondition.toString());
+ modifyValueOnConditionItem.setId(GridHeaderOperationId.COLUMNEDIT.toString());
modifyValueOnConditionItem.setIcon(TabularDataResources.INSTANCE.columnValues());
menuItems.add(modifyValueOnConditionItem);
MenuItem newAnnotationColumnItem = new MenuItem("Annotation");
- newAnnotationColumnItem.setId(GridHeaderOperationId.NewAnnotationColumn.toString());
+ newAnnotationColumnItem.setId(GridHeaderOperationId.ANNOTATIONADD.toString());
newAnnotationColumnItem.setIcon(TabularDataResources.INSTANCE.annotationAdd());
menuItems.add(newAnnotationColumnItem);
MenuItem columnDuplicateValidationItem = new MenuItem("Duplicate Detection");
- columnDuplicateValidationItem.setId(GridHeaderOperationId.ColumnDuplicateValidation.toString());
+ columnDuplicateValidationItem.setId(GridHeaderOperationId.DUPLICATEDETECTION.toString());
columnDuplicateValidationItem.setIcon(TabularDataResources.INSTANCE.tableDuplicateRows());
menuItems.add(columnDuplicateValidationItem);
-
-
}
/**