Added Position Column
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@112340 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0cf68d06eb
commit
66c3f34d0c
|
@ -88,7 +88,6 @@ import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderL
|
||||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author "Giancarlo Panichi" <a
|
||||||
|
@ -146,8 +145,6 @@ public class TabularDataController {
|
||||||
return eventBus;
|
return eventBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ContentPanel getToolBoxPanel() {
|
public ContentPanel getToolBoxPanel() {
|
||||||
return toolBoxPanel;
|
return toolBoxPanel;
|
||||||
}
|
}
|
||||||
|
@ -193,32 +190,32 @@ public class TabularDataController {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pendingTasksRetrieve() {
|
private void pendingTasksRetrieve() {
|
||||||
TDGWTServiceAsync.INSTANCE.pendingTasksRetrieve(new AsyncCallback<Integer>() {
|
TDGWTServiceAsync.INSTANCE
|
||||||
|
.pendingTasksRetrieve(new AsyncCallback<Integer>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.info("No valid user found: " + caught.getMessage());
|
Log.info("No valid user found: " + caught.getMessage());
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
sessionExpiredShowDelayed();
|
sessionExpiredShowDelayed();
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
UtilsGXT3.alert("Error",
|
||||||
}
|
caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Integer pending) {
|
public void onSuccess(Integer pending) {
|
||||||
Log.info("Pending Tasks Retrieved: "+pending);
|
Log.info("Pending Tasks Retrieved: " + pending);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void sessionExpiredShowDelayed() {
|
private void sessionExpiredShowDelayed() {
|
||||||
Timer timeoutTimer = new Timer() {
|
Timer timeoutTimer = new Timer() {
|
||||||
|
@ -671,7 +668,6 @@ public class TabularDataController {
|
||||||
|
|
||||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirm",
|
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirm",
|
||||||
"Are you sure you want to delete the tabular resource?");
|
"Are you sure you want to delete the tabular resource?");
|
||||||
|
|
||||||
|
|
||||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||||
|
|
||||||
|
@ -707,7 +703,6 @@ public class TabularDataController {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
mb.setWidth(300);
|
mb.setWidth(300);
|
||||||
mb.show();
|
mb.show();
|
||||||
|
|
||||||
|
@ -796,6 +791,9 @@ public class TabularDataController {
|
||||||
case TABLE_TYPE:
|
case TABLE_TYPE:
|
||||||
openTableType();
|
openTableType();
|
||||||
break;
|
break;
|
||||||
|
case COLUMN_POSITION:
|
||||||
|
openPositionColumn();
|
||||||
|
break;
|
||||||
case COLUMN_LABEL:
|
case COLUMN_LABEL:
|
||||||
openColumnLabel();
|
openColumnLabel();
|
||||||
break;
|
break;
|
||||||
|
@ -861,7 +859,7 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case GEOMETRY_POINT:
|
case GEOMETRY_POINT:
|
||||||
openGeometryCreatePoint();
|
openGeometryCreatePoint();
|
||||||
break;
|
break;
|
||||||
case ANNOTATION_ADD:
|
case ANNOTATION_ADD:
|
||||||
break;
|
break;
|
||||||
case COLUMN_FILTER:
|
case COLUMN_FILTER:
|
||||||
|
@ -939,7 +937,7 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case DUPLICATESROWSPANEL:
|
case DUPLICATESROWSPANEL:
|
||||||
break;
|
break;
|
||||||
case LABELCOLUNPANEL:
|
case LABELCOLUMNPANEL:
|
||||||
break;
|
break;
|
||||||
case VALIDATIONSTASKSPANEL:
|
case VALIDATIONSTASKSPANEL:
|
||||||
break;
|
break;
|
||||||
|
@ -975,8 +973,7 @@ public class TabularDataController {
|
||||||
tdmLogs.show();
|
tdmLogs.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openBatchReplace(TRId trId,
|
private void openBatchReplace(TRId trId, RequestProperties requestProperties) {
|
||||||
RequestProperties requestProperties) {
|
|
||||||
Log.debug("Request Open Batch Replace Dialog: " + trId + " "
|
Log.debug("Request Open Batch Replace Dialog: " + trId + " "
|
||||||
+ requestProperties);
|
+ requestProperties);
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
|
@ -1635,12 +1632,12 @@ public class TabularDataController {
|
||||||
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
|
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
|
||||||
historyDiscard.discard();
|
historyDiscard.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openRStudio() {
|
private void openRStudio() {
|
||||||
Log.debug("Request Open RStudio");
|
Log.debug("Request Open RStudio");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
RStudio rStudio=new RStudio(trId, eventBus);
|
RStudio rStudio = new RStudio(trId, eventBus);
|
||||||
} else {
|
} else {
|
||||||
Log.error("TRId is null");
|
Log.error("TRId is null");
|
||||||
UtilsGXT3.alert("Error", "No current tabular resource present");
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
||||||
|
@ -1648,8 +1645,6 @@ public class TabularDataController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void openStatistical() {
|
private void openStatistical() {
|
||||||
GWT.runAsync(new RunAsyncCallback() {
|
GWT.runAsync(new RunAsyncCallback() {
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
@ -1767,8 +1762,7 @@ public class TabularDataController {
|
||||||
openColumnBatchReplace(null, null);
|
openColumnBatchReplace(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openColumnBatchReplace(String columnLocalId,
|
private void openColumnBatchReplace(String columnLocalId, String columnName) {
|
||||||
String columnName) {
|
|
||||||
Log.debug("Request Open Batch Replace Dialog");
|
Log.debug("Request Open Batch Replace Dialog");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId,
|
ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId,
|
||||||
|
@ -1890,6 +1884,25 @@ public class TabularDataController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openPositionColumn() {
|
||||||
|
openPositionColumn(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openPositionColumn(String columnLocalId, String columnName) {
|
||||||
|
Log.debug("Request Position Column Tab");
|
||||||
|
if (trId != null) {
|
||||||
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
|
WidgetRequestType.POSITIONCOLUMNPANEL);
|
||||||
|
e.setTrId(trId);
|
||||||
|
e.setColumnLocalId(columnLocalId);
|
||||||
|
e.setColumnName(columnName);
|
||||||
|
eventBus.fireEvent(e);
|
||||||
|
} else {
|
||||||
|
Log.error("TRId is null");
|
||||||
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void openColumnLabel() {
|
private void openColumnLabel() {
|
||||||
openColumnLabel(null, null);
|
openColumnLabel(null, null);
|
||||||
}
|
}
|
||||||
|
@ -1898,7 +1911,7 @@ public class TabularDataController {
|
||||||
Log.debug("Request Column Label Tab");
|
Log.debug("Request Column Label Tab");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
WidgetRequestType.LABELCOLUNPANEL);
|
WidgetRequestType.LABELCOLUMNPANEL);
|
||||||
e.setTrId(trId);
|
e.setTrId(trId);
|
||||||
e.setColumnLocalId(columnLocalId);
|
e.setColumnLocalId(columnLocalId);
|
||||||
e.setColumnName(columnName);
|
e.setColumnName(columnName);
|
||||||
|
@ -1934,44 +1947,45 @@ public class TabularDataController {
|
||||||
UtilsGXT3.alert("Error", "No tabular resource present");
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void openGeospatialCSquare() {
|
private void openGeospatialCSquare() {
|
||||||
Log.debug("Request Geospatial Create C-Square Coordiantes Tab");
|
Log.debug("Request Geospatial Create C-Square Coordiantes Tab");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
||||||
e.setTrId(trId);
|
e.setTrId(trId);
|
||||||
HashMap<RequestPropertiesParameterType, Object> map=new HashMap<RequestPropertiesParameterType, Object>();
|
HashMap<RequestPropertiesParameterType, Object> map = new HashMap<RequestPropertiesParameterType, Object>();
|
||||||
map.put(RequestPropertiesParameterType.Coordinates, GeospatialCoordinatesType.C_SQUARE);
|
map.put(RequestPropertiesParameterType.Coordinates,
|
||||||
RequestProperties requestProperties= new RequestProperties(map);
|
GeospatialCoordinatesType.C_SQUARE);
|
||||||
|
RequestProperties requestProperties = new RequestProperties(map);
|
||||||
e.setRequestProperties(requestProperties);
|
e.setRequestProperties(requestProperties);
|
||||||
eventBus.fireEvent(e);
|
eventBus.fireEvent(e);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.error("TRId is null");
|
Log.error("TRId is null");
|
||||||
UtilsGXT3.alert("Error", "No tabular resource present");
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openGeospatialOceanArea() {
|
private void openGeospatialOceanArea() {
|
||||||
Log.debug("Request Geospatial Create Ocean Area Coordiantes Tab");
|
Log.debug("Request Geospatial Create Ocean Area Coordiantes Tab");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
WidgetRequestType.GEOSPATIALCREATECOORDINATESPANEL);
|
||||||
e.setTrId(trId);
|
e.setTrId(trId);
|
||||||
HashMap<RequestPropertiesParameterType, Object> map=new HashMap<RequestPropertiesParameterType, Object>();
|
HashMap<RequestPropertiesParameterType, Object> map = new HashMap<RequestPropertiesParameterType, Object>();
|
||||||
map.put(RequestPropertiesParameterType.Coordinates, GeospatialCoordinatesType.OCEAN_AREA);
|
map.put(RequestPropertiesParameterType.Coordinates,
|
||||||
RequestProperties requestProperties= new RequestProperties(map);
|
GeospatialCoordinatesType.OCEAN_AREA);
|
||||||
|
RequestProperties requestProperties = new RequestProperties(map);
|
||||||
e.setRequestProperties(requestProperties);
|
e.setRequestProperties(requestProperties);
|
||||||
eventBus.fireEvent(e);
|
eventBus.fireEvent(e);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.error("TRId is null");
|
Log.error("TRId is null");
|
||||||
UtilsGXT3.alert("Error", "No tabular resource present");
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openGeometryCreatePoint() {
|
private void openGeometryCreatePoint() {
|
||||||
Log.debug("Request Geometry Create Point Tab");
|
Log.debug("Request Geometry Create Point Tab");
|
||||||
if (trId != null) {
|
if (trId != null) {
|
||||||
|
@ -1979,16 +1993,13 @@ public class TabularDataController {
|
||||||
WidgetRequestType.GEOMETRYCREATEPOINTPANEL);
|
WidgetRequestType.GEOMETRYCREATEPOINTPANEL);
|
||||||
e.setTrId(trId);
|
e.setTrId(trId);
|
||||||
eventBus.fireEvent(e);
|
eventBus.fireEvent(e);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.error("TRId is null");
|
Log.error("TRId is null");
|
||||||
UtilsGXT3.alert("Error", "No tabular resource present");
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void openBackgroundMonitor() {
|
private void openBackgroundMonitor() {
|
||||||
Log.debug("Request Open Monitor Background Tab");
|
Log.debug("Request Open Monitor Background Tab");
|
||||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||||
|
@ -1996,8 +2007,7 @@ public class TabularDataController {
|
||||||
eventBus.fireEvent(e);
|
eventBus.fireEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doChangeTableRequestEventCommand(
|
private void doChangeTableRequestEventCommand(ChangeTableRequestEvent event) {
|
||||||
ChangeTableRequestEvent event) {
|
|
||||||
Log.debug("Change Table Request: " + event);
|
Log.debug("Change Table Request: " + event);
|
||||||
switch (event.getWhy()) {
|
switch (event.getWhy()) {
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
|
@ -2015,10 +2025,9 @@ public class TabularDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private void addActiveTabularResourceAndOpen(final TRId trId) {
|
||||||
private void addActiveTabularResourceAndOpen(final TRId trId){
|
Log.debug("Add Active TabResource Search: " + trId);
|
||||||
Log.debug("Add Active TabResource Search: "+trId);
|
|
||||||
TDGWTServiceAsync.INSTANCE.getTabResourceInformation(trId,
|
TDGWTServiceAsync.INSTANCE.getTabResourceInformation(trId,
|
||||||
new AsyncCallback<TabResource>() {
|
new AsyncCallback<TabResource>() {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -2053,10 +2062,10 @@ public class TabularDataController {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addActiveTabularResourceAndOpen(final TabResource tabResource) {
|
private void addActiveTabularResourceAndOpen(final TabResource tabResource) {
|
||||||
Log.debug("Add Active TabResource: "+tabResource);
|
Log.debug("Add Active TabResource: " + tabResource);
|
||||||
TDGWTServiceAsync.INSTANCE.setTabResource(tabResource
|
TDGWTServiceAsync.INSTANCE.setTabResource(tabResource,
|
||||||
,
|
|
||||||
new AsyncCallback<Void>() {
|
new AsyncCallback<Void>() {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
@ -2090,9 +2099,6 @@ public class TabularDataController {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void doRowAdd() {
|
private void doRowAdd() {
|
||||||
onRowAdd();
|
onRowAdd();
|
||||||
|
@ -2141,7 +2147,7 @@ public class TabularDataController {
|
||||||
* @param rowsRaw
|
* @param rowsRaw
|
||||||
*/
|
*/
|
||||||
private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
|
private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
|
||||||
if (rowsRaw == null||rowsRaw.isEmpty()) {
|
if (rowsRaw == null || rowsRaw.isEmpty()) {
|
||||||
UtilsGXT3.alert("No rows selected", "No rows selected");
|
UtilsGXT3.alert("No rows selected", "No rows selected");
|
||||||
} else {
|
} else {
|
||||||
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
|
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
|
||||||
|
@ -2218,71 +2224,75 @@ public class TabularDataController {
|
||||||
.getColumnSelected());
|
.getColumnSelected());
|
||||||
String columnName = mainBoxPanel.getColumnName(event
|
String columnName = mainBoxPanel.getColumnName(event
|
||||||
.getColumnSelected());
|
.getColumnSelected());
|
||||||
|
|
||||||
|
|
||||||
Log.debug("Selected column[ColumnLocalId: " + columnLocalId
|
Log.debug("Selected column[ColumnLocalId: " + columnLocalId
|
||||||
+ ", ColumnName: " + columnName + "]");
|
+ ", ColumnName: " + columnName + "]");
|
||||||
|
if (opId.compareTo(GridHeaderOperationId.COLUMNPOSITION.toString()) == 0) {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
|
openPositionColumn(columnLocalId, columnName);
|
||||||
openColumnLabel(columnLocalId, columnName);
|
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
|
if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
|
||||||
openColumnAdd(columnLocalId, columnName);
|
openColumnLabel(columnLocalId, columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNBATCHREPLACE
|
if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
|
||||||
.toString()) == 0) {
|
openColumnAdd(columnLocalId, columnName);
|
||||||
openColumnBatchReplace(columnLocalId, columnName);
|
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
|
if (opId.compareTo(GridHeaderOperationId.COLUMNBATCHREPLACE
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
openColumnDelete(columnLocalId, columnName);
|
openColumnBatchReplace(columnLocalId, columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
|
if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
openChangeColumnType(columnLocalId, columnName);
|
openColumnDelete(columnLocalId, columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
|
if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
openColumnFilter(columnLocalId, columnName);
|
openChangeColumnType(columnLocalId, columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
|
if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
|
openColumnFilter(columnLocalId, columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.DUPLICATEDETECTION
|
if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNSPLIT
|
if (opId.compareTo(GridHeaderOperationId.DUPLICATEDETECTION
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
openColumnSplit(columnLocalId,
|
|
||||||
columnName);
|
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNMERGE
|
if (opId.compareTo(GridHeaderOperationId.COLUMNSPLIT
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
openColumnMerge(columnLocalId,
|
openColumnSplit(columnLocalId,
|
||||||
columnName);
|
columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXPRESSION
|
if (opId.compareTo(GridHeaderOperationId.COLUMNMERGE
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
|
openColumnMerge(
|
||||||
openReplaceColumnByExpression(
|
|
||||||
columnLocalId,
|
columnLocalId,
|
||||||
columnName);
|
columnName);
|
||||||
} else {
|
} else {
|
||||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXTERNAL
|
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXPRESSION
|
||||||
.toString()) == 0) {
|
.toString()) == 0) {
|
||||||
|
|
||||||
openReplaceByExternalColWizard(
|
openReplaceColumnByExpression(
|
||||||
columnLocalId,
|
columnLocalId,
|
||||||
columnName);
|
columnName);
|
||||||
} else {
|
} else {
|
||||||
|
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXTERNAL
|
||||||
|
.toString()) == 0) {
|
||||||
|
|
||||||
|
openReplaceByExternalColWizard(
|
||||||
|
columnLocalId,
|
||||||
|
columnName);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2290,12 +2300,10 @@ public class TabularDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,6 +209,12 @@ public interface TabularDataResources extends ClientBundle {
|
||||||
|
|
||||||
@Source("column-add.png")
|
@Source("column-add.png")
|
||||||
ImageResource columnAdd();
|
ImageResource columnAdd();
|
||||||
|
|
||||||
|
@Source("column-reorder_32.png")
|
||||||
|
ImageResource columnReorder32();
|
||||||
|
|
||||||
|
@Source("column-reorder.png")
|
||||||
|
ImageResource columnReorder();
|
||||||
|
|
||||||
@Source("column-values_32.png")
|
@Source("column-values_32.png")
|
||||||
ImageResource columnValues32();
|
ImageResource columnValues32();
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 857 B |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -35,24 +35,29 @@ public class CurationToolBar {
|
||||||
|
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
private ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
|
//Validation
|
||||||
private TextButton duplicateDetectionButton;
|
private TextButton duplicateDetectionButton;
|
||||||
|
private TextButton applyTemplateButton;
|
||||||
//private TextButton rulesButton;
|
//private TextButton rulesButton;
|
||||||
//private TextButton manageRulesButton;
|
//private TextButton manageRulesButton;
|
||||||
private TextButton applyTemplateButton;
|
|
||||||
private TextButton normalizeButton;
|
//Structure
|
||||||
private TextButton denormalizeButton;
|
private TextButton tableTypeButton;
|
||||||
|
private TextButton changePositionColumnButton;
|
||||||
private TextButton changeColumnLabelButton;
|
private TextButton changeColumnLabelButton;
|
||||||
private TextButton columnTypeButton;
|
private TextButton columnTypeButton;
|
||||||
private TextButton tableTypeButton;
|
|
||||||
private TextButton addColumnButton;
|
private TextButton addColumnButton;
|
||||||
private TextButton deleteColumnButton;
|
private TextButton deleteColumnButton;
|
||||||
private TextButton splitColumnButton;
|
private TextButton splitColumnButton;
|
||||||
private TextButton mergeColumnButton;
|
private TextButton mergeColumnButton;
|
||||||
|
private TextButton denormalizeButton;
|
||||||
|
private TextButton normalizeButton;
|
||||||
|
|
||||||
|
|
||||||
|
//Helper
|
||||||
private TextButton extractCodelistButton;
|
private TextButton extractCodelistButton;
|
||||||
private TextButton codelistMappingButton;
|
private TextButton codelistMappingButton;
|
||||||
//private TextButton generateSummaryButton;
|
//private TextButton generateSummaryButton;
|
||||||
|
|
||||||
public CurationToolBar(EventBus eventBus) {
|
public CurationToolBar(EventBus eventBus) {
|
||||||
|
@ -181,6 +186,25 @@ public class CurationToolBar {
|
||||||
structureLayout.setWidget(0, 0, tableTypeButton);
|
structureLayout.setWidget(0, 0, tableTypeButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
|
||||||
|
changePositionColumnButton = new TextButton("Position Column",
|
||||||
|
TabularDataResources.INSTANCE.columnReorder32());
|
||||||
|
changePositionColumnButton.disable();
|
||||||
|
changePositionColumnButton.setScale(ButtonScale.LARGE);
|
||||||
|
changePositionColumnButton.setIconAlign(IconAlign.TOP);
|
||||||
|
changePositionColumnButton.setToolTip("Change position column");
|
||||||
|
changePositionColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
changePositionColumnButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
eventBus.fireEvent(new RibbonEvent(RibbonType.COLUMN_POSITION));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
structureLayout.setWidget(0, 1, changePositionColumnButton);
|
||||||
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
changeColumnLabelButton = new TextButton("Labels",
|
changeColumnLabelButton = new TextButton("Labels",
|
||||||
TabularDataResources.INSTANCE.columnLabel32());
|
TabularDataResources.INSTANCE.columnLabel32());
|
||||||
changeColumnLabelButton.disable();
|
changeColumnLabelButton.disable();
|
||||||
|
@ -195,8 +219,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 1, changeColumnLabelButton);
|
structureLayout.setWidget(0, 2, changeColumnLabelButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
columnTypeButton = new TextButton("Column Type",
|
columnTypeButton = new TextButton("Column Type",
|
||||||
TabularDataResources.INSTANCE.columnType32());
|
TabularDataResources.INSTANCE.columnType32());
|
||||||
|
@ -212,8 +236,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 2, columnTypeButton);
|
structureLayout.setWidget(0, 3, columnTypeButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
addColumnButton = new TextButton("Add Column",
|
addColumnButton = new TextButton("Add Column",
|
||||||
TabularDataResources.INSTANCE.columnAdd32());
|
TabularDataResources.INSTANCE.columnAdd32());
|
||||||
|
@ -229,8 +253,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 3, addColumnButton);
|
structureLayout.setWidget(0, 4, addColumnButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||||
|
|
||||||
deleteColumnButton = new TextButton("Delete Column",
|
deleteColumnButton = new TextButton("Delete Column",
|
||||||
TabularDataResources.INSTANCE.columnDelete32());
|
TabularDataResources.INSTANCE.columnDelete32());
|
||||||
|
@ -246,8 +270,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 4, deleteColumnButton);
|
structureLayout.setWidget(0, 5, deleteColumnButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
||||||
|
|
||||||
//
|
//
|
||||||
splitColumnButton = new TextButton("Split Column",
|
splitColumnButton = new TextButton("Split Column",
|
||||||
|
@ -264,8 +288,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 5, splitColumnButton);
|
structureLayout.setWidget(0, 6, splitColumnButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
||||||
|
|
||||||
mergeColumnButton = new TextButton("Merge Column",
|
mergeColumnButton = new TextButton("Merge Column",
|
||||||
TabularDataResources.INSTANCE.columnMerge32());
|
TabularDataResources.INSTANCE.columnMerge32());
|
||||||
|
@ -281,8 +305,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 6, mergeColumnButton);
|
structureLayout.setWidget(0, 7, mergeColumnButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
||||||
//
|
//
|
||||||
|
|
||||||
denormalizeButton = new TextButton("Denormalize",
|
denormalizeButton = new TextButton("Denormalize",
|
||||||
|
@ -299,8 +323,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 7, denormalizeButton);
|
structureLayout.setWidget(0, 8, denormalizeButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 8, 2);
|
||||||
|
|
||||||
normalizeButton = new TextButton("Normalize",
|
normalizeButton = new TextButton("Normalize",
|
||||||
TabularDataResources.INSTANCE.tableNormalize32());
|
TabularDataResources.INSTANCE.tableNormalize32());
|
||||||
|
@ -316,8 +340,8 @@ public class CurationToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
structureLayout.setWidget(0, 8, normalizeButton);
|
structureLayout.setWidget(0, 9, normalizeButton);
|
||||||
structureLayout.getFlexCellFormatter().setRowSpan(0, 8, 2);
|
structureLayout.getFlexCellFormatter().setRowSpan(0, 9, 2);
|
||||||
|
|
||||||
cleanCells(structureLayout.getElement());
|
cleanCells(structureLayout.getElement());
|
||||||
|
|
||||||
|
@ -414,37 +438,44 @@ public class CurationToolBar {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
//rulesButton.disable();
|
|
||||||
normalizeButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
applyTemplateButton.disable();
|
applyTemplateButton.disable();
|
||||||
denormalizeButton.disable();
|
//rulesButton.disable();
|
||||||
|
//manageRulesButton.disable();
|
||||||
|
|
||||||
|
tableTypeButton.disable();
|
||||||
|
changePositionColumnButton.disable();
|
||||||
changeColumnLabelButton.disable();
|
changeColumnLabelButton.disable();
|
||||||
columnTypeButton.disable();
|
columnTypeButton.disable();
|
||||||
tableTypeButton.disable();
|
|
||||||
addColumnButton.disable();
|
addColumnButton.disable();
|
||||||
deleteColumnButton.disable();
|
deleteColumnButton.disable();
|
||||||
splitColumnButton.disable();
|
splitColumnButton.disable();
|
||||||
mergeColumnButton.disable();
|
mergeColumnButton.disable();
|
||||||
|
denormalizeButton.disable();
|
||||||
|
normalizeButton.disable();
|
||||||
|
|
||||||
extractCodelistButton.disable();
|
extractCodelistButton.disable();
|
||||||
codelistMappingButton.disable();
|
codelistMappingButton.disable();
|
||||||
//generateSummaryButton.disable();
|
//generateSummaryButton.disable();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
//rulesButton.disable();
|
|
||||||
normalizeButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
applyTemplateButton.disable();
|
applyTemplateButton.disable();
|
||||||
denormalizeButton.disable();
|
//rulesButton.disable();
|
||||||
|
//manageRulesButton.disable();
|
||||||
|
|
||||||
|
tableTypeButton.disable();
|
||||||
|
changePositionColumnButton.disable();
|
||||||
changeColumnLabelButton.disable();
|
changeColumnLabelButton.disable();
|
||||||
columnTypeButton.disable();
|
columnTypeButton.disable();
|
||||||
tableTypeButton.disable();
|
|
||||||
addColumnButton.disable();
|
addColumnButton.disable();
|
||||||
deleteColumnButton.disable();
|
deleteColumnButton.disable();
|
||||||
splitColumnButton.disable();
|
splitColumnButton.disable();
|
||||||
mergeColumnButton.disable();
|
mergeColumnButton.disable();
|
||||||
|
denormalizeButton.disable();
|
||||||
|
normalizeButton.disable();
|
||||||
|
|
||||||
extractCodelistButton.disable();
|
extractCodelistButton.disable();
|
||||||
codelistMappingButton.disable();
|
codelistMappingButton.disable();
|
||||||
//generateSummaryButton.disable();
|
//generateSummaryButton.disable();
|
||||||
|
@ -456,15 +487,18 @@ public class CurationToolBar {
|
||||||
//rulesButton.disable();
|
//rulesButton.disable();
|
||||||
//manageRulesButton.disable();
|
//manageRulesButton.disable();
|
||||||
applyTemplateButton.enable();
|
applyTemplateButton.enable();
|
||||||
denormalizeButton.enable();
|
|
||||||
normalizeButton.enable();
|
tableTypeButton.enable();
|
||||||
|
changePositionColumnButton.enable();
|
||||||
changeColumnLabelButton.enable();
|
changeColumnLabelButton.enable();
|
||||||
columnTypeButton.enable();
|
columnTypeButton.enable();
|
||||||
tableTypeButton.enable();
|
|
||||||
addColumnButton.enable();
|
addColumnButton.enable();
|
||||||
deleteColumnButton.enable();
|
deleteColumnButton.enable();
|
||||||
splitColumnButton.enable();
|
splitColumnButton.enable();
|
||||||
mergeColumnButton.enable();
|
mergeColumnButton.enable();
|
||||||
|
denormalizeButton.enable();
|
||||||
|
normalizeButton.enable();
|
||||||
|
|
||||||
extractCodelistButton.enable();
|
extractCodelistButton.enable();
|
||||||
TRId trId = event.getTrId();
|
TRId trId = event.getTrId();
|
||||||
if (trId != null && trId.getTableType() != null
|
if (trId != null && trId.getTableType() != null
|
||||||
|
@ -477,18 +511,21 @@ public class CurationToolBar {
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
duplicateDetectionButton.disable();
|
duplicateDetectionButton.disable();
|
||||||
//rulesButton.disable();
|
|
||||||
normalizeButton.disable();
|
|
||||||
//manageRulesButton.disable();
|
|
||||||
applyTemplateButton.disable();
|
applyTemplateButton.disable();
|
||||||
denormalizeButton.disable();
|
//rulesButton.disable();
|
||||||
|
//manageRulesButton.disable();
|
||||||
|
|
||||||
|
tableTypeButton.disable();
|
||||||
|
changePositionColumnButton.disable();
|
||||||
changeColumnLabelButton.disable();
|
changeColumnLabelButton.disable();
|
||||||
columnTypeButton.disable();
|
columnTypeButton.disable();
|
||||||
tableTypeButton.disable();
|
|
||||||
addColumnButton.disable();
|
addColumnButton.disable();
|
||||||
deleteColumnButton.disable();
|
deleteColumnButton.disable();
|
||||||
splitColumnButton.disable();
|
splitColumnButton.disable();
|
||||||
mergeColumnButton.disable();
|
mergeColumnButton.disable();
|
||||||
|
denormalizeButton.disable();
|
||||||
|
normalizeButton.disable();
|
||||||
|
|
||||||
extractCodelistButton.disable();
|
extractCodelistButton.disable();
|
||||||
codelistMappingButton.disable();
|
codelistMappingButton.disable();
|
||||||
//generateSummaryButton.disable();
|
//generateSummaryButton.disable();
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 857 B |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -87,7 +87,7 @@
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED" /> -->
|
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED" /> -->
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
|
|
Loading…
Reference in New Issue