Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@91786 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7aabcf2fd6
commit
6e9ef3b4ae
|
@ -24,7 +24,7 @@
|
|||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.td.expressionwidget.client.ExpressionWidgetEntry' /> -->
|
||||
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
|
|
|
@ -29,13 +29,7 @@ public class ColumnExpressionDialog extends Window {
|
|||
public ColumnExpressionDialog(String columnId,
|
||||
ColumnTypeCode columnTypeCode, ColumnDataType dataTypeName,
|
||||
EventBus eventBus) {
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
setBodyBorder(false);
|
||||
setResizable(false);
|
||||
setHeadingText("New Rule");
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.rule());
|
||||
|
||||
initWindow();
|
||||
this.eventBus = eventBus;
|
||||
column = new ColumnData();
|
||||
column.setColumnId(columnId);
|
||||
|
@ -47,18 +41,23 @@ public class ColumnExpressionDialog extends Window {
|
|||
|
||||
public ColumnExpressionDialog(TRId trId, String columnName,
|
||||
EventBus eventBus) {
|
||||
initWindow();
|
||||
this.eventBus = eventBus;
|
||||
this.trId = trId;
|
||||
this.columnName = columnName;
|
||||
load(trId, columnName);
|
||||
|
||||
}
|
||||
|
||||
protected void initWindow(){
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
setBodyBorder(false);
|
||||
setResizable(false);
|
||||
setHeadingText("New Rule");
|
||||
setClosable(false);
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.rule());
|
||||
|
||||
this.eventBus = eventBus;
|
||||
this.trId = trId;
|
||||
this.columnName = columnName;
|
||||
load(trId, columnName);
|
||||
|
||||
}
|
||||
|
||||
protected void create() {
|
||||
|
@ -114,13 +113,7 @@ public class ColumnExpressionDialog extends Window {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
ExpressionEvent expressionEvent= new ExpressionEvent(ExpressionType.EXPRESSIONNULL);
|
||||
Log.debug(expressionEvent.toString());
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
hide(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -185,8 +185,10 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
expressionEvent.setColumnId(column.getColumnId());
|
||||
expressionEvent.setColumnName(column.getName());
|
||||
Log.debug(expressionEvent.toString());
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
parent.hide();
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void saveRule() {
|
||||
|
@ -201,8 +203,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
protected void close() {
|
||||
ExpressionEvent expressionEvent= new ExpressionEvent(ExpressionType.EXPRESSIONNULL);
|
||||
Log.debug(expressionEvent.toString());
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
parent.hide();
|
||||
eventBus.fireEvent(expressionEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -89,6 +89,8 @@ public class ConditionWidget extends SimpleContainer {
|
|||
groupMatch = new ToggleGroup();
|
||||
groupMatch.add(radioAll);
|
||||
groupMatch.add(radioAny);
|
||||
groupMatch.setValue(radioAll);
|
||||
|
||||
|
||||
vert = new VerticalLayoutContainer();
|
||||
vert.setScrollMode(ScrollMode.AUTO);
|
||||
|
@ -388,14 +390,16 @@ public class ConditionWidget extends SimpleContainer {
|
|||
Log.debug(expression.toString());
|
||||
arguments.add(expression);
|
||||
}
|
||||
Log.debug("Expression Arguments Calculated: " +arguments.size());
|
||||
if (arguments.size() > 0) {
|
||||
if (arguments.size() == 1) {
|
||||
exp = arguments.get(0);
|
||||
} else {
|
||||
Radio radio = (Radio) groupMatch.getValue();
|
||||
Log.debug("Match:"+radio);
|
||||
if (radio.getName().compareTo("All") == 0) {
|
||||
} else {
|
||||
exp = mapOp.createC_And(arguments);
|
||||
} else {
|
||||
if (radio.getName().compareTo("Any") == 0) {
|
||||
exp = mapOp.createC_Or(arguments);
|
||||
} else {
|
||||
|
@ -405,7 +409,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
}
|
||||
|
||||
}
|
||||
Log.debug("C_Expression" + exp);
|
||||
Log.debug("C_Expression:" + exp.toString());
|
||||
return exp;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC
|
|||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
|
||||
|
@ -20,7 +19,8 @@ public class ExpressionWidgetEntry implements EntryPoint {
|
|||
EventBus eventBus= new SimpleEventBus();
|
||||
|
||||
ColumnExpressionDialog expressionDialog=new ColumnExpressionDialog("1", ColumnTypeCode.ATTRIBUTE, ColumnDataType.Integer, eventBus);
|
||||
RootPanel.get().add(expressionDialog);
|
||||
expressionDialog.show();
|
||||
//RootPanel.get().add(expressionDialog);
|
||||
|
||||
Log.info("Hello!");
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.td.expressionwidget.client.ExpressionWidgetEntry' /> -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.td.expressionwidget.client.ExpressionWidgetEntry' /> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
|
|
Loading…
Reference in New Issue