Updated ColumnData

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@113959 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-13 10:58:22 +00:00
parent e55042d90b
commit 2421a8f333
19 changed files with 306 additions and 52 deletions

View File

@ -6,14 +6,14 @@ import org.gcube.portlets.user.td.expressionwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ExpressionWrapperEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -6,12 +6,13 @@ import org.gcube.portlets.user.td.expressionwidget.client.properties.ColumnDataP
import org.gcube.portlets.user.td.expressionwidget.client.resources.ExpressionResources;
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ConditionTypeMapException;
import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_Not;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ExpressionWrapperEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.C_ExpressionContainer;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;
@ -47,7 +48,7 @@ import com.sencha.gxt.widget.core.client.form.TextField;
*/
public class ColumnExpressionPanel extends FramedPanel {
private enum ColumnExpressionPanelType {
MultiColumnFilter, ColumnFilter, RowDeleteByExpression, Template;
MultiColumnFilter, ColumnFilter, RowDeleteByExpression, Template, Rule;
}
private static final String WIDTH_MULTI = "642px";
@ -58,7 +59,7 @@ public class ColumnExpressionPanel extends FramedPanel {
private ColumnExpressionPanelType type;
private EventBus eventBus;
private ColumnExpressionDialog parentRuleDialog;
private ColumnExpressionDialog parentTemplateDialog;
private ColumnFilterDialog parentFilterDialog;
private RowsDeleteByExpressionDialog parentRowsDeleteByExpressionDialog;
private MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel;
@ -72,7 +73,14 @@ public class ColumnExpressionPanel extends FramedPanel {
private FieldSet conditionsField;
private ConditionWidget conditionWidget;
private ComboBox<ColumnData> comboCols;
private RuleDialog parentRuleDialog;
/**
*
* @param parentMultiColumnFilterTabPanel
* @param column
* @param eventBus
*/
public ColumnExpressionPanel(
MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel,
ColumnData column, EventBus eventBus) {
@ -88,7 +96,14 @@ public class ColumnExpressionPanel extends FramedPanel {
createOnMultiColumnFilter();
}
/**
*
* @param parentFilterDialog
* @param column
* @param columns
* @param eventBus
*/
public ColumnExpressionPanel(ColumnFilterDialog parentFilterDialog,
ColumnData column, ArrayList<ColumnData> columns, EventBus eventBus) {
super();
@ -103,6 +118,13 @@ public class ColumnExpressionPanel extends FramedPanel {
createOnFilter();
}
/**
*
* @param parentRowsDeleteByExpressionDialog
* @param column
* @param columns
* @param eventBus
*/
public ColumnExpressionPanel(
RowsDeleteByExpressionDialog parentRowsDeleteByExpressionDialog,
ColumnData column, ArrayList<ColumnData> columns, EventBus eventBus) {
@ -120,16 +142,17 @@ public class ColumnExpressionPanel extends FramedPanel {
/**
*
* @param trId
* @param columnLocalId
* @param parentColumnExpressionDialog
* @param column
* @param eventBus
*/
public ColumnExpressionPanel(ColumnExpressionDialog parent,
public ColumnExpressionPanel(ColumnExpressionDialog parentColumnExpressionDialog,
ColumnData column, EventBus eventBus) {
super();
setWidth(WIDTH);
setHeight(HEIGHT);
type = ColumnExpressionPanelType.Template;
this.parentRuleDialog = parent;
this.parentTemplateDialog = parentColumnExpressionDialog;
this.column = column;
this.columns = null;
this.eventBus = eventBus;
@ -137,6 +160,119 @@ public class ColumnExpressionPanel extends FramedPanel {
createOnTemplate();
}
/**
*
* @param parentRuleDialog
* @param eventBus
*/
public ColumnExpressionPanel(RuleDialog parentRuleDialog,
EventBus eventBus) {
super();
setWidth(WIDTH);
setHeight(HEIGHT);
type = ColumnExpressionPanelType.Rule;
this.parentRuleDialog = parentRuleDialog;
this.column = null;
this.columns = null;
this.eventBus = eventBus;
Log.debug("Column:" + column);
createOnRule();
}
protected void createOnRule() {
// Important: fixed rendering of widgets
forceLayoutOnResize = true;
setBodyBorder(false);
setHeaderVisible(false);
VerticalLayoutContainer basicLayout = new VerticalLayoutContainer();
basicLayout.setAdjustForScroll(true);
FieldSet properties = null;
VerticalLayoutContainer propertiesLayout;
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
flowButton.setPack(BoxLayoutPack.CENTER);
properties = new FieldSet();
properties.setHeadingText("Properties");
properties.setCollapsible(false);
propertiesLayout = new VerticalLayoutContainer();
properties.add(propertiesLayout);
createColumnMockUp(propertiesLayout);
conditionsField = new FieldSet();
conditionsField.setHeadingText("Conditions");
conditionsField.setCollapsible(false);
conditionWidget = new ConditionWidget(column);
Log.debug("ConditionWidget" + conditionWidget);
conditionsField.add(conditionWidget);
btnApply = new TextButton("Apply");
btnApply.setIcon(ExpressionResources.INSTANCE.apply());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setToolTip("Apply rule");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
Log.debug("Pressed Apply");
applySeleceted();
}
});
btnClose = new TextButton("Close");
btnClose.setIcon(ExpressionResources.INSTANCE.close());
btnClose.setIconAlign(IconAlign.RIGHT);
btnClose.setToolTip("Cancel rule");
btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
Log.debug("Pressed Close");
close();
}
});
flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
basicLayout.add(properties, new VerticalLayoutData(1, -1,
new Margins(1)));
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
new Margins(1)));
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
5, 2, 5, 2)));
add(basicLayout);
}
//TODO
private void createColumnMockUp(VerticalLayoutContainer propertiesLayout) {
TextField columnType = new TextField();
columnType.setToolTip("The type of column");
columnType.setReadOnly(true);
columnType.setValue(column.getTypeCode());
propertiesLayout.add(new FieldLabel(columnType, "Column Type"),
new VerticalLayoutData(1, -1));
TextField dataType = new TextField();
dataType.setToolTip("The data type");
dataType.setReadOnly(true);
dataType.setValue(column.getDataTypeName());
propertiesLayout.add(new FieldLabel(dataType, "Data Type"),
new VerticalLayoutData(1, -1));
}
protected void createOnTemplate() {
// Important: fixed rendering of widgets
@ -188,7 +324,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnApply = new TextButton("Apply");
btnApply.setIcon(ExpressionResources.INSTANCE.apply());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setTitle("Apply rule");
btnApply.setToolTip("Apply rule");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -201,7 +337,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnClose = new TextButton("Close");
btnClose.setIcon(ExpressionResources.INSTANCE.close());
btnClose.setIconAlign(IconAlign.RIGHT);
btnClose.setTitle("Cancel rule");
btnClose.setToolTip("Cancel rule");
btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -284,7 +420,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnApply = new TextButton("Apply");
btnApply.setIcon(ExpressionResources.INSTANCE.applyFilter());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setTitle("Apply Filter");
btnApply.setToolTip("Apply Filter");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -300,7 +436,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnClose = new TextButton("Close");
btnClose.setIcon(ExpressionResources.INSTANCE.close());
btnClose.setIconAlign(IconAlign.RIGHT);
btnClose.setTitle("Cancel filter");
btnClose.setToolTip("Cancel filter");
btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -383,7 +519,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnApply.setIcon(ExpressionResources.INSTANCE
.tableRowDeleteByExpression());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setTitle("Delete rows");
btnApply.setToolTip("Delete rows");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -399,7 +535,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnClose = new TextButton("Close");
btnClose.setIcon(ExpressionResources.INSTANCE.close());
btnClose.setIconAlign(IconAlign.RIGHT);
btnClose.setTitle("Cancel filter");
btnClose.setToolTip("Cancel filter");
btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -531,7 +667,7 @@ public class ColumnExpressionPanel extends FramedPanel {
btnApply = new TextButton("Add");
btnApply.setIcon(ExpressionResources.INSTANCE.applyFilter());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setTitle("Add Filter");
btnApply.setToolTip("Add Filter");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -564,26 +700,46 @@ public class ColumnExpressionPanel extends FramedPanel {
UtilsGXT3.alert("Attention", e.getLocalizedMessage());
return;
}
C_ExpressionContainer condContainer=null;
ExpressionWrapper exWrapper=null;
ExpressionWrapperEvent expressionEvent=null;
switch (type) {
case Template:
parentRuleDialog.setExpression(exp);
C_ExpressionContainer condContainer = new C_ExpressionContainer();
parentTemplateDialog.setExpression(exp);
condContainer = new C_ExpressionContainer();
condContainer.setId(C_ExpressionContainer.Contains.C_Expression);
condContainer.setExp(exp);
condContainer.setReadableExpression(conditionWidget
.getReadableExpression());
ExpressionWrapper exWrapper=new ExpressionWrapper(column.getTrId(),
column.getColumnId(), column.getName(),condContainer);
ExpressionWrapperEvent expressionEvent = new ExpressionWrapperEvent(
exWrapper=new ExpressionWrapper(column.getTrId(),
column,condContainer);
expressionEvent = new ExpressionWrapperEvent(
exWrapper);
Log.debug(expressionEvent.toString());
parentRuleDialog.hide();
parentTemplateDialog.hide();
eventBus.fireEvent(expressionEvent);
break;
case ColumnFilter:
parentFilterDialog.applyFilter(column, exp);
break;
case Rule:
ColumnMockUp columnMockUp=new ColumnMockUp();
column = new ColumnData();
column.setColumnId(columnMockUp.getColumnId());
column.setLabel(columnMockUp.getLabel());
column.setDataTypeName(columnMockUp.getColumnDataType().toString());
column.setTypeCode(columnMockUp.getColumnType().toString());
condContainer = new C_ExpressionContainer();
condContainer.setId(C_ExpressionContainer.Contains.C_Expression);
condContainer.setExp(exp);
condContainer.setReadableExpression(conditionWidget
.getReadableExpression());
exWrapper=new ExpressionWrapper(null,column,condContainer);
parentRuleDialog.addRule(exWrapper);
break;
case RowDeleteByExpression:
C_Expression notExp=new C_Not(exp);
parentRowsDeleteByExpressionDialog.deleteRowsByExpression(column,notExp);
@ -612,7 +768,7 @@ public class ColumnExpressionPanel extends FramedPanel {
ExpressionWrapper exWrapper=new ExpressionWrapper();
ExpressionWrapperEvent expressionEvent = new ExpressionWrapperEvent(exWrapper);
Log.debug(expressionEvent.toString());
parentRuleDialog.hide();
parentTemplateDialog.hide();
eventBus.fireEvent(expressionEvent);
break;
case ColumnFilter:

View File

@ -9,7 +9,6 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.FilterColumnSession;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
@ -21,6 +20,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredTy
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -15,8 +15,8 @@ import org.gcube.portlets.user.td.expressionwidget.client.threshold.ThresholdPro
import org.gcube.portlets.user.td.expressionwidget.client.threshold.ThresholdStore;
import org.gcube.portlets.user.td.expressionwidget.shared.condition.ConditionTypeMap;
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ConditionTypeMapException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -3,10 +3,10 @@ package org.gcube.portlets.user.td.expressionwidget.client;
import org.gcube.portlets.user.td.expressionwidget.client.expression.ReplaceExpressionDialog;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -6,10 +6,10 @@ import org.gcube.portlets.user.td.expressionwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;

View File

@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.expressionwidget.client;
import java.util.ArrayList;
import java.util.HashMap;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -10,8 +10,6 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnMockUp;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ReplaceColumnByExpressionSession;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
@ -23,6 +21,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredTy
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -8,12 +8,12 @@ import org.gcube.portlets.user.td.expressionwidget.client.resources.ExpressionRe
import org.gcube.portlets.user.td.expressionwidget.client.type.ReplaceExpressionType;
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ConditionTypeMapException;
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ReplaceTypeMapException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ExpressionWrapperEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.C_ExpressionContainer;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
@ -261,7 +261,7 @@ public class ReplaceColumnByExpressionPanel extends FramedPanel {
btnApply.setIcon(ExpressionResources.INSTANCE
.columnReplaceByExpression());
btnApply.setIconAlign(IconAlign.RIGHT);
btnApply.setTitle("Apply replace by expression");
btnApply.setToolTip("Apply replace by expression");
btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -277,7 +277,7 @@ public class ReplaceColumnByExpressionPanel extends FramedPanel {
btnClose = new TextButton("Close");
btnClose.setIcon(ExpressionResources.INSTANCE.close());
btnClose.setIconAlign(IconAlign.RIGHT);
btnClose.setTitle("Close");
btnClose.setToolTip("Close");
btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -538,7 +538,7 @@ public class ReplaceColumnByExpressionPanel extends FramedPanel {
}
ExpressionWrapper exWrapper = new ExpressionWrapper(
column.getTrId(), column.getColumnId(), column.getName(),
column.getTrId(),column,
conditionExpressionContainer, replaceValue);
ExpressionWrapperEvent expressionEvent = new ExpressionWrapperEvent(
exWrapper);
@ -581,7 +581,7 @@ public class ReplaceColumnByExpressionPanel extends FramedPanel {
cReplaceExpression, replaceWidget.getReadableExpression());
ExpressionWrapper exWrapper = new ExpressionWrapper(
column.getTrId(), column.getColumnId(), column.getName(),
column.getTrId(), column,
conditionExpressionContainer, replaceExpressionContainer);
ExpressionWrapperEvent expressionEvent = new ExpressionWrapperEvent(
exWrapper);

View File

@ -16,11 +16,11 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -9,7 +9,6 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.FilterColumnSession;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
@ -21,6 +20,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredTy
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -0,0 +1,98 @@
package org.gcube.portlets.user.td.expressionwidget.client;
import org.gcube.portlets.user.td.expressionwidget.client.resources.ExpressionResources;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper;
import com.allen_sauer.gwt.log.client.Log;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.widget.core.client.Window;
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class RuleDialog extends Window {
private static final String WIDTH = "660px";
private static final String HEIGHT = "426px";
private ColumnExpressionPanel columnExpressionPanel;
private EventBus eventBus;
/**
*
* @param columnMockUp
* @param eventBus
*/
public RuleDialog(EventBus eventBus) {
initWindow();
this.eventBus = eventBus;
create();
}
protected void initWindow() {
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(false);
setHeadingText("New Rule");
setClosable(true);
setModal(true);
forceLayoutOnResize = true;
getHeader().setIcon(ExpressionResources.INSTANCE.rule());
}
/**
* {@inheritDoc}
*/
@Override
protected void initTools() {
super.initTools();
closeBtn.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
close();
}
});
}
protected void close (){
//ExpressionWrapper exWrapper=new ExpressionWrapper();
//ExpressionWrapperEvent expressionEvent = new ExpressionWrapperEvent(exWrapper);
//Log.debug(expressionEvent.toString());
hide();
//eventBus.fireEvent(expressionEvent);
}
protected void create() {
columnExpressionPanel = new ColumnExpressionPanel(this,
eventBus);
add(columnExpressionPanel);
}
public void addRule(ExpressionWrapper exWrapper) {
Log.debug("ExpressionWrapper: "+exWrapper);
}
}

View File

@ -10,11 +10,11 @@ import org.gcube.portlets.user.td.expressionwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -7,12 +7,12 @@ import org.gcube.portlets.user.td.expressionwidget.client.ReplaceWidget;
import org.gcube.portlets.user.td.expressionwidget.client.resources.ExpressionResources;
import org.gcube.portlets.user.td.expressionwidget.client.type.ReplaceExpressionType;
import org.gcube.portlets.user.td.expressionwidget.shared.exception.ReplaceTypeMapException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ExpressionWrapperEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.C_ExpressionContainer;
import org.gcube.portlets.user.td.widgetcommonevent.client.expression.ExpressionWrapper;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
@ -397,7 +397,7 @@ public class ReplaceExpressionPanel extends FramedPanel {
switch (type) {
case Template:
exWrapper = new ExpressionWrapper(
replaceValue, column.getTrId(), column.getColumnId(), column.getName());
replaceValue, column.getTrId(),column);
expressionEvent = new ExpressionWrapperEvent(
exWrapper);
Log.debug(expressionEvent.toString());
@ -407,7 +407,7 @@ public class ReplaceExpressionPanel extends FramedPanel {
case Replace:
case AddColumn:
exWrapper = new ExpressionWrapper(
replaceValue, column.getTrId(), column.getColumnId(), column.getName());
replaceValue, column.getTrId(), column);
expressionWrapperNotification=new ExpressionWrapperNotification(exWrapper);
parent.applyReplaceColumnByExpression(expressionWrapperNotification);
break;
@ -439,7 +439,7 @@ public class ReplaceExpressionPanel extends FramedPanel {
C_ExpressionContainer.Contains.C_Expression,
cReplaceExpression, replaceWidget.getReadableExpression());
exWrapper = new ExpressionWrapper(
replaceExpressionContainer, column.getTrId(), column.getColumnId(), column.getName());
replaceExpressionContainer, column.getTrId(), column);
expressionEvent = new ExpressionWrapperEvent(
exWrapper);
@ -453,7 +453,7 @@ public class ReplaceExpressionPanel extends FramedPanel {
C_ExpressionContainer.Contains.C_Expression,
cReplaceExpression, replaceWidget.getReadableExpression());
exWrapper = new ExpressionWrapper(
replaceExpressionContainer, column.getTrId(), column.getColumnId(), column.getName());
replaceExpressionContainer, column.getTrId(), column);
expressionWrapperNotification=new ExpressionWrapperNotification(exWrapper);
parent.applyReplaceColumnByExpression(expressionWrapperNotification);
break;

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.td.expressionwidget.client.operation;
import java.util.ArrayList;
import org.gcube.portlets.user.td.expressionwidget.shared.model.C_OperatorType;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;

View File

@ -1,6 +1,6 @@
package org.gcube.portlets.user.td.expressionwidget.client.properties;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;

View File

@ -27,12 +27,12 @@ import org.gcube.portlets.user.td.gwtservice.server.SessionUtil;
import org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl;
import org.gcube.portlets.user.td.gwtservice.server.trservice.TabularResourceTypeMap;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnMockUp;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.AddColumnSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.FilterColumnSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ReplaceColumnByExpressionSession;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockUp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -34,8 +34,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_IsNull
import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_Not;
import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_Or;
import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.C_ValueIsIn;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import com.allen_sauer.gwt.log.client.Log;

View File

@ -19,8 +19,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.composite.text.C
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.C_ColumnReference;
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.C_ColumnReferencePlaceholder;
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.TD_Value;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expression;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
import com.allen_sauer.gwt.log.client.Log;