From ba5a9088bfdc40490ddf8a6f21b7edc6aacd0878 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 17 Feb 2014 11:55:50 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@91767 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/ColumnExpressionDialog.java | 1 + .../client/ColumnExpressionPanel.java | 32 ++++++------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java index 3991aba..80fc6b8 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java @@ -81,6 +81,7 @@ public class ColumnExpressionDialog extends Window { protected void setExpression(C_Expression exp) { Log.debug("New Expression set:"+exp.toString()); this.exp = exp; + } protected void load(TRId trId, String columnName) { diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java index a5a64b1..6842391 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionPanel.java @@ -60,14 +60,7 @@ public class ColumnExpressionPanel extends FramedPanel { protected void create() { setBodyBorder(false); - //setWidth(WIDTH); - //setHeight(HEIGHT); setHeaderVisible(false); - /* - setResize(true); - setHeadingText("New Rule"); - getHeader().setIcon(ExpressionResources.INSTANCE.rule()); - */ VerticalLayoutContainer basicLayout = new VerticalLayoutContainer(); basicLayout.setScrollMode(ScrollMode.AUTO); @@ -79,20 +72,6 @@ public class ColumnExpressionPanel extends FramedPanel { VerticalLayoutContainer propertiesLayout = new VerticalLayoutContainer(); properties.add(propertiesLayout); - - /* - TextField name = new TextField(); - - name.setToolTip("The name of rule"); - propertiesLayout.add(new FieldLabel(name, "Name"), - new VerticalLayoutData(1, -1)); - - TextArea description = new TextArea(); - description.setHeight("100px"); - description.setToolTip("The description of rule"); - propertiesLayout.add(new FieldLabel(description, "Description"), - new VerticalLayoutData(1, -1)); - */ TextField columnType = new TextField(); columnType.setToolTip("The type of column"); @@ -169,6 +148,7 @@ public class ColumnExpressionPanel extends FramedPanel { public void onSelect(SelectEvent event) { Log.debug("Pressed Close"); + close(); } }); @@ -200,8 +180,12 @@ public class ColumnExpressionPanel extends FramedPanel { container.setId(C_ExpressionContainer.Contains.C_Expression); container.setExp(exp); expressionEvent.setC_ExpressionContainer(container); + expressionEvent.setTrId(column.getTrId()); + expressionEvent.setColumnId(column.getColumnId()); + expressionEvent.setColumnName(column.getName()); Log.debug(expressionEvent.toString()); eventBus.fireEvent(expressionEvent); + parent.hide(); } protected void saveRule() { @@ -213,8 +197,10 @@ public class ColumnExpressionPanel extends FramedPanel { } - protected void cancelRule() { - + protected void close() { + ExpressionEvent expressionEvent= new ExpressionEvent(ExpressionType.EXPRESSIONNULL); + eventBus.fireEvent(expressionEvent); + parent.hide(); }