Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@90896 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-05 09:25:26 +00:00
parent 1a0df93ecf
commit b1bd798d4e
4 changed files with 48 additions and 62 deletions

View File

@ -7,6 +7,9 @@
<dependent-module archiveName="tabular-data-widget-common-event-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event"> <dependent-module archiveName="tabular-data-widget-common-event-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="tabular-data-gwt-service-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-gwt-service/tabular-data-gwt-service">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-toolbox-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget"> <dependent-module archiveName="tabular-data-toolbox-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

View File

@ -115,7 +115,6 @@ public class TabularDataController {
} }
}); });
eventBus.addHandler(RibbonEvent.TYPE, eventBus.addHandler(RibbonEvent.TYPE,
new RibbonEvent.RibbonEventHandler() { new RibbonEvent.RibbonEventHandler() {
@ -125,27 +124,21 @@ public class TabularDataController {
} }
}); });
eventBus.addHandler( eventBus.addHandler(TasksMonitorEvent.TYPE,
TasksMonitorEvent.TYPE,
new TasksMonitorEvent.TasksMonitorEventHandler() { new TasksMonitorEvent.TasksMonitorEventHandler() {
public void onTasksMonitorEvent( public void onTasksMonitorEvent(TasksMonitorEvent event) {
TasksMonitorEvent event) {
Log.debug("Catch Event HeaderColumnMenuItemEvent"); Log.debug("Catch Event HeaderColumnMenuItemEvent");
doTasksMonitorCommand(event); doTasksMonitorCommand(event);
} }
}); });
eventBus.fireEvent(new UIStateEvent(UIStateType.START)); eventBus.fireEvent(new UIStateEvent(UIStateType.START));
} }
protected void alertMessage(String reason, String details) { protected void alertMessage(String reason, String details) {
AlertMessageBox d = new AlertMessageBox(reason, details); AlertMessageBox d = new AlertMessageBox(reason, details);
d.addHideHandler(new HideHandler() { d.addHideHandler(new HideHandler() {
@ -186,7 +179,6 @@ public class TabularDataController {
eventBus.fireEvent(uiStateEvent); eventBus.fireEvent(uiStateEvent);
} }
/* /*
* protected void updateUIProperties(){ if (uiToolBox == UIToolBox.OPENED) { * protected void updateUIProperties(){ if (uiToolBox == UIToolBox.OPENED) {
* trProperties.update(); } } * trProperties.update(); } }
@ -197,13 +189,13 @@ public class TabularDataController {
Log.debug("CloseTabularResource Open"); Log.debug("CloseTabularResource Open");
tabularData.closeTable(); tabularData.closeTable();
trId = null; trId = null;
tableOpening=null; tableOpening = null;
uiState = UIStateType.TR_CLOSE; uiState = UIStateType.TR_CLOSE;
Log.debug("fireEvent TR_CLOSE"); Log.debug("fireEvent TR_CLOSE");
try { try {
eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE)); eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE));
} catch (Exception e) { } catch (Exception e) {
Log.debug("Bus Error: "+e.getMessage()); Log.debug("Bus Error: " + e.getMessage());
} }
} }
} }
@ -371,17 +363,18 @@ public class TabularDataController {
} }
} }
protected void doTasksMonitorCommand(TasksMonitorEvent event){ protected void doTasksMonitorCommand(TasksMonitorEvent event) {
TaskType taskType=event.getTaskType(); TaskType taskType = event.getTaskType();
Log.debug("Received TaskMonitorEvent: "+taskType); Log.debug("Received TaskMonitorEvent: " + taskType);
switch (taskType) { switch (taskType) {
case OPENTABLE: case OPENTABLE:
//openTable(event.getTrId()); // openTable(event.getTrId());
break; break;
default: default:
break; break;
} }
} }
/* /*
* protected void openToolBox() { if (uiState == UIStateType.TR_OPEN) { if * protected void openToolBox() { if (uiState == UIStateType.TR_OPEN) { if
* (uiToolBox == UIToolBox.OPENED) { toolBoxPanel.collapse(); * (uiToolBox == UIToolBox.OPENED) { toolBoxPanel.collapse();
@ -578,7 +571,6 @@ public class TabularDataController {
} }
protected com.extjs.gxt.ui.client.widget.Window tdTaskMainWindow; protected com.extjs.gxt.ui.client.widget.Window tdTaskMainWindow;
protected void openTasksManagerWizard() { protected void openTasksManagerWizard() {
@ -588,12 +580,11 @@ public class TabularDataController {
tdTaskMainWindow.show(); tdTaskMainWindow.show();
} }
protected void openColumnTYPE() {
protected void openColumnTYPE(){
Log.debug("Request Open Change Column Tab"); Log.debug("Request Open Change Column Tab");
if(trId!=null){ if (trId != null) {
WidgetRequestEvent e= new WidgetRequestEvent(WidgetRequestType.CHANGECOLUMNTYPEPANEL); WidgetRequestEvent e = new WidgetRequestEvent(
WidgetRequestType.CHANGECOLUMNTYPEPANEL);
e.setTrId(trId); e.setTrId(trId);
eventBus.fireEvent(e); eventBus.fireEvent(e);
} }
@ -608,41 +599,35 @@ public class TabularDataController {
String columnName = tabularData.getColumnId(event.getColumnSelected()); String columnName = tabularData.getColumnId(event.getColumnSelected());
Log.debug("GridColumnName: " + columnName); Log.debug("GridColumnName: " + columnName);
if (opId.compareTo(GridHeaderOperationId.AddLabel.toString()) == 0) { if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.ChangeLabel.toString()) == 0) { if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.RemoveLabel.toString()) == 0) { if (opId.compareTo(GridHeaderOperationId.COLUMNEDIT.toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.RemoveColumn if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
.toString()) == 0) { .toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.ChangeToType if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
.toString()) == 0) {
openColumnTYPE();
} else {
if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
.toString()) == 0) { .toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.ColumnDuplicateValidation if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
.toString()) == 0) { .toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.Filter if (opId.compareTo(GridHeaderOperationId.DUPLICATEDETECTION
.toString()) == 0) { .toString()) == 0) {
} else { } else {
if (opId.compareTo(GridHeaderOperationId.ModifyColumnValueOnCondition
.toString()) == 0) {
} else {
if (opId.compareTo(GridHeaderOperationId.NewAnnotationColumn
.toString()) == 0) {
} else {
}
} }

View File

@ -19,18 +19,18 @@ public class GridContextMenu {
public GridContextMenu(){ public GridContextMenu(){
tableContextMenu=new Menu(); 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"); MenuItem addRowItem = new MenuItem("Add Row");
addRowItem.setId(GridOperationId.EditRow.toString()); addRowItem.setId(GridOperationId.ROWADD.toString());
addRowItem.setIcon(TabularDataResources.INSTANCE.rowInsert()); addRowItem.setIcon(TabularDataResources.INSTANCE.rowInsert());
tableContextMenu.add(addRowItem); 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"); MenuItem removeRowItem = new MenuItem("Remove Row");
removeRowItem.setId(GridOperationId.EditRow.toString()); removeRowItem.setId(GridOperationId.ROWDELETE.toString());
removeRowItem.setIcon(TabularDataResources.INSTANCE.rowRemove()); removeRowItem.setIcon(TabularDataResources.INSTANCE.rowRemove());
tableContextMenu.add(removeRowItem); tableContextMenu.add(removeRowItem);

View File

@ -24,51 +24,49 @@ public class GridHeaderColumnMenu {
MenuItem changeLabelItem = new MenuItem("Labels"); MenuItem changeLabelItem = new MenuItem("Labels");
changeLabelItem.setId(GridHeaderOperationId.ChangeLabel changeLabelItem.setId(GridHeaderOperationId.COLUMNLABEL
.toString()); .toString());
changeLabelItem.setIcon(TabularDataResources.INSTANCE.columnLabel()); changeLabelItem.setIcon(TabularDataResources.INSTANCE.columnLabel());
menuItems.add(changeLabelItem); menuItems.add(changeLabelItem);
MenuItem addColumnItem = new MenuItem("Add Column"); MenuItem addColumnItem = new MenuItem("Add Column");
addColumnItem.setId(GridHeaderOperationId.NewAnnotationColumn.toString()); addColumnItem.setId(GridHeaderOperationId.COLUMNADD.toString());
addColumnItem.setIcon(TabularDataResources.INSTANCE.columnAdd()); addColumnItem.setIcon(TabularDataResources.INSTANCE.columnAdd());
menuItems.add(addColumnItem); menuItems.add(addColumnItem);
MenuItem deleteColumnItem = new MenuItem("Delete Column"); MenuItem deleteColumnItem = new MenuItem("Delete Column");
deleteColumnItem.setId(GridHeaderOperationId.RemoveColumn.toString()); deleteColumnItem.setId(GridHeaderOperationId.COLUMNDELETE.toString());
deleteColumnItem.setIcon(TabularDataResources.INSTANCE.columnDelete()); deleteColumnItem.setIcon(TabularDataResources.INSTANCE.columnDelete());
menuItems.add(deleteColumnItem); menuItems.add(deleteColumnItem);
MenuItem changeToTypeItem = new MenuItem("Change Type"); MenuItem changeToTypeItem = new MenuItem("Change Type");
changeToTypeItem.setId(GridHeaderOperationId.ChangeToType.toString()); changeToTypeItem.setId(GridHeaderOperationId.COLUMNTYPE.toString());
changeToTypeItem.setIcon(TabularDataResources.INSTANCE.columnType()); changeToTypeItem.setIcon(TabularDataResources.INSTANCE.columnType());
menuItems.add(changeToTypeItem); menuItems.add(changeToTypeItem);
MenuItem filterItem = new MenuItem("Filter"); MenuItem filterItem = new MenuItem("Filter");
filterItem.setId(GridHeaderOperationId.Filter.toString()); filterItem.setId(GridHeaderOperationId.COLUMNFILTER.toString());
filterItem.setIcon(TabularDataResources.INSTANCE.columnFilter()); filterItem.setIcon(TabularDataResources.INSTANCE.columnFilter());
menuItems.add(filterItem); menuItems.add(filterItem);
MenuItem modifyValueOnConditionItem = new MenuItem("Edit"); MenuItem modifyValueOnConditionItem = new MenuItem("Edit");
modifyValueOnConditionItem.setId(GridHeaderOperationId.ModifyColumnValueOnCondition.toString()); modifyValueOnConditionItem.setId(GridHeaderOperationId.COLUMNEDIT.toString());
modifyValueOnConditionItem.setIcon(TabularDataResources.INSTANCE.columnValues()); modifyValueOnConditionItem.setIcon(TabularDataResources.INSTANCE.columnValues());
menuItems.add(modifyValueOnConditionItem); menuItems.add(modifyValueOnConditionItem);
MenuItem newAnnotationColumnItem = new MenuItem("Annotation"); MenuItem newAnnotationColumnItem = new MenuItem("Annotation");
newAnnotationColumnItem.setId(GridHeaderOperationId.NewAnnotationColumn.toString()); newAnnotationColumnItem.setId(GridHeaderOperationId.ANNOTATIONADD.toString());
newAnnotationColumnItem.setIcon(TabularDataResources.INSTANCE.annotationAdd()); newAnnotationColumnItem.setIcon(TabularDataResources.INSTANCE.annotationAdd());
menuItems.add(newAnnotationColumnItem); menuItems.add(newAnnotationColumnItem);
MenuItem columnDuplicateValidationItem = new MenuItem("Duplicate Detection"); MenuItem columnDuplicateValidationItem = new MenuItem("Duplicate Detection");
columnDuplicateValidationItem.setId(GridHeaderOperationId.ColumnDuplicateValidation.toString()); columnDuplicateValidationItem.setId(GridHeaderOperationId.DUPLICATEDETECTION.toString());
columnDuplicateValidationItem.setIcon(TabularDataResources.INSTANCE.tableDuplicateRows()); columnDuplicateValidationItem.setIcon(TabularDataResources.INSTANCE.tableDuplicateRows());
menuItems.add(columnDuplicateValidationItem); menuItems.add(columnDuplicateValidationItem);
} }
/** /**