Minor Updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@92151 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-24 11:23:21 +00:00
parent d8b0db0065
commit 51e7528d6d
11 changed files with 270 additions and 37 deletions

View File

@ -190,3 +190,163 @@ Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
50% complete (ETR: 5 seconds)
60% complete (ETR: 4 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 16.73 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
30% complete (ETR: 9 seconds)
40% complete (ETR: 8 seconds)
50% complete (ETR: 6 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 4 seconds)
80% complete (ETR: 3 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 17.91 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.01 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
50% complete (ETR: 4 seconds)
60% complete (ETR: 3 seconds)
70% complete (ETR: 2 seconds)
80% complete (ETR: 1 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 9.42 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
40% complete (ETR: 9 seconds)
50% complete (ETR: 7 seconds)
60% complete (ETR: 6 seconds)
70% complete (ETR: 4 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 14.28 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
10% complete (ETR: 41 seconds)
10% complete (ETR: 41 seconds)
20% complete (ETR: 24 seconds)
30% complete (ETR: 17 seconds)
40% complete (ETR: 11 seconds)
50% complete (ETR: 8 seconds)
60% complete (ETR: 6 seconds)
70% complete (ETR: 4 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 15.01 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes

View File

@ -17,6 +17,12 @@ import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.event.HideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnExpressionDialog extends Window {
protected String WIDTH = "650px";
protected String HEIGHT = "426px";

View File

@ -57,6 +57,7 @@ public class ColumnExpressionPanel extends FramedPanel {
public ColumnExpressionPanel(MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel,
ColumnData column, EventBus eventBus) {
super();
type = ColumnExpressionPanelType.MultiColumnFilter;
this.parentMultiColumnFilterTabPanel = parentMultiColumnFilterTabPanel;
this.column = column;
@ -68,6 +69,7 @@ public class ColumnExpressionPanel extends FramedPanel {
public ColumnExpressionPanel(ColumnFilterDialog parentFilterDialog,
ColumnData column, EventBus eventBus) {
super();
type = ColumnExpressionPanelType.ColumnFilter;
this.parentFilterDialog = parentFilterDialog;
this.column = column;
@ -84,6 +86,7 @@ public class ColumnExpressionPanel extends FramedPanel {
*/
public ColumnExpressionPanel(ColumnExpressionDialog parent,
ColumnData column, EventBus eventBus) {
super();
type = ColumnExpressionPanelType.ColumnRule;
this.parentRuleDialog = parent;
this.column = column;
@ -169,6 +172,7 @@ public class ColumnExpressionPanel extends FramedPanel {
conditions.setCollapsible(false);
conditionWidget = new ConditionWidget(column);
Log.debug("ConditionWidget"+conditionWidget);
conditions.add(conditionWidget);
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
@ -282,11 +286,11 @@ public class ColumnExpressionPanel extends FramedPanel {
break;
}
basicLayout.add(properties, new VerticalLayoutData(-1, -1, new Margins(
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(
1)));
basicLayout.add(conditions, new VerticalLayoutData(-1, -1, new Margins(
basicLayout.add(conditions, new VerticalLayoutData(1, -1, new Margins(
1)));
basicLayout.add(flowButton, new VerticalLayoutData(-1, -1, new Margins(
basicLayout.add(flowButton, new VerticalLayoutData(1, -1, new Margins(
5, 2, 5, 2)));
add(basicLayout);
show();

View File

@ -20,6 +20,13 @@ import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.event.HideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnFilterDialog extends Window {
protected String WIDTH = "650px";
protected String HEIGHT = "400px";

View File

@ -50,24 +50,31 @@ public class ConditionWidget extends SimpleContainer {
protected FieldLabel matchLabel;
protected ToggleGroup groupMatch;
protected String itemIdCombo = "ComboConditions";
protected String itemIdFirstArg = "FirstArg";
protected String itemIdSecondArg = "SecondArg";
protected String itemIdBtnAdd = "BtnAdd";
protected String itemIdBtnDel = "BtnDel";
protected String itemIdCombo;
protected String itemIdFirstArg;
protected String itemIdSecondArg;
protected String itemIdBtnAdd;
protected String itemIdBtnDel;
protected VerticalLayoutContainer vert;
protected ColumnData column;
protected String readableExpression;
ConditionWidget(ColumnData column) {
super();
this.column = column;
setBorders(true);
setHeight(HEIGHT);
thisCont = this;
itemIdCombo = "ComboConditions"+column.getName();
itemIdFirstArg = "FirstArg"+column.getName();
itemIdSecondArg = "SecondArg"+column.getName();
itemIdBtnAdd = "BtnAdd"+column.getName();
itemIdBtnDel = "BtnDel"+column.getName();
VerticalLayoutContainer baseLayout = new VerticalLayoutContainer();
@ -114,7 +121,7 @@ public class ConditionWidget extends SimpleContainer {
firstArg.setItemId(itemIdFirstArg);
firstArg.setVisible(false);
final HTML andText = new HTML(
final HTML andText = new HTML(
"<div style='vertical-align:middle; margin-left:2px;margin-right:2px;margin-top:4px;'>and</div>");
andText.setVisible(false);
@ -122,7 +129,7 @@ public class ConditionWidget extends SimpleContainer {
secondArg.setItemId(itemIdSecondArg);
secondArg.setVisible(false);
final IconButton btnAdd = new IconButton();
final IconButton btnAdd = new IconButton();
btnAdd.setItemId(itemIdBtnAdd);
btnAdd.setIcon(ExpressionResources.INSTANCE.add());
btnAdd.addClickHandler(new ClickHandler() {
@ -137,8 +144,8 @@ public class ConditionWidget extends SimpleContainer {
});
btnAdd.setVisible(false);
final IconButton btnDel = new IconButton();
btnAdd.setItemId(itemIdBtnDel);
final IconButton btnDel = new IconButton();
btnDel.setItemId(itemIdBtnDel);
btnDel.setIcon(ExpressionResources.INSTANCE.delete());
btnDel.addClickHandler(new ClickHandler() {
@ -160,8 +167,11 @@ public class ConditionWidget extends SimpleContainer {
btnDel.setVisible(false);
OperationProperties props = GWT.create(OperationProperties.class);
Log.debug("Props: "+props);
ListStore<Operation> storeOp = new ListStore<Operation>(props.id());
storeOp.addAll(OperationsStore.getAll(column.getDataTypeName()));
Log.debug("Store: "+storeOp);
OperationsStore factory=new OperationsStore();
storeOp.addAll(factory.getAll(column.getDataTypeName()));
Log.debug("Store created");
ComboBox<Operation> comboOp = new ComboBox<Operation>(storeOp,
@ -223,11 +233,10 @@ public class ConditionWidget extends SimpleContainer {
thisCont.forceLayout();
}
}
});
comboOp.setEmptyText("Select a condition...");
comboOp.setItemId(itemIdCombo);
comboOp.setWidth("230px");
@ -244,7 +253,10 @@ public class ConditionWidget extends SimpleContainer {
vert.add(horiz, new VerticalLayoutData(-1, -1, new Margins(1)));
}
protected void addCondition() {
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
@ -295,12 +307,15 @@ public class ConditionWidget extends SimpleContainer {
});
OperationProperties props = GWT.create(OperationProperties.class);
Log.debug("Props: "+props);
ListStore<Operation> storeOp = new ListStore<Operation>(props.id());
storeOp.addAll(OperationsStore.getAll(column.getDataTypeName()));
Log.debug("Store: "+storeOp);
OperationsStore factory=new OperationsStore();
storeOp.addAll(factory.getAll(column.getDataTypeName()));
Log.trace("Store created");
ComboBox<Operation> comboOp = new ComboBox<Operation>(storeOp,
final ComboBox<Operation> comboOp = new ComboBox<Operation>(storeOp,
props.label());
Log.trace("ComboOperation created");

View File

@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.expressionwidget.client;
import java.util.ArrayList;
import org.gcube.portlets.user.td.expressionwidget.client.resource.ExpressionResources;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
@ -10,34 +11,50 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.widget.core.client.Window;
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.event.HideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class MultiColumnFilterDialog extends Window {
private MultiColumnFilterTabPanel mcfTabPanel;
protected String WIDTH = "640px";
protected String HEIGHT = "480px";
protected C_Expression exp = null;
protected TRId trId;
protected EventBus eventBus;
protected ArrayList<ColumnData> columns;
public MultiColumnFilterDialog(TRId trId, EventBus eventBus) {
this.eventBus = eventBus;
this.trId = trId;
initWindow();
load(trId);
}
protected void create(){
protected void create(){
mcfTabPanel=new MultiColumnFilterTabPanel(this, "Filter", eventBus);
add(mcfTabPanel);
}
protected void initWindow() {
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
setResizable(false);
setHeadingText("Filter");
MultiColumnFilterTabPanel mcfTabPanel=new MultiColumnFilterTabPanel(this, "Filter", eventBus);
add(mcfTabPanel);
show();
setClosable(true);
getHeader().setIcon(ExpressionResources.INSTANCE.filter());
}
@ -65,7 +82,6 @@ public class MultiColumnFilterDialog extends Window {
Log.debug("Retrived column: " + result);
columns = result;
create();
}
});

View File

@ -12,6 +12,13 @@ import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.widget.core.client.TabItemConfig;
import com.sencha.gxt.widget.core.client.TabPanel;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class MultiColumnFilterTabPanel extends TabPanel {
protected EventBus eventBus;

View File

@ -11,7 +11,12 @@ import com.google.gwt.user.client.ui.Image;
import com.sencha.gxt.core.client.XTemplates;
import com.sencha.gxt.core.client.dom.XElement;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DefaultAppearance implements IconButtonAppearance {
public interface Template extends XTemplates {

View File

@ -11,9 +11,16 @@ import com.google.gwt.user.client.Event;
import com.sencha.gxt.core.client.dom.XDOM;
import com.sencha.gxt.widget.core.client.Component;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class IconButton extends Component implements HasClickHandlers {
private final IconButtonAppearance appearance;
private IconButtonAppearance appearance;
public IconButton() {
this((IconButtonAppearance) GWT.create(DefaultAppearance.class));

View File

@ -4,6 +4,12 @@ import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.sencha.gxt.core.client.dom.XElement;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface IconButtonAppearance {
void render(SafeHtmlBuilder sb);
void onUpdateIcon(XElement parent, ImageResource icon);

View File

@ -13,9 +13,9 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.C_OperatorType;
*
*/
public class OperationsStore {
static ArrayList<Operation> operations;
protected ArrayList<Operation> operations;
static ArrayList<Operation> operationsNumeric = new ArrayList<Operation>() {
protected ArrayList<Operation> operationsNumeric = new ArrayList<Operation>() {
private static final long serialVersionUID = -6559885743626876431L;
{
add(new Operation(1,"EQUALS","The value is equal to",C_OperatorType.EQUALS));
@ -34,7 +34,7 @@ public class OperationsStore {
add(new Operation(14,"NOT_IN","The value is not in",C_OperatorType.NOT_IN));
}};
static ArrayList<Operation> operationsText = new ArrayList<Operation>() {
protected ArrayList<Operation> operationsText = new ArrayList<Operation>() {
private static final long serialVersionUID = -6559885743626876431L;
{
add(new Operation(1,"EQUALS","The value is equal to",C_OperatorType.EQUALS));
@ -55,7 +55,7 @@ public class OperationsStore {
add(new Operation(16,"NOT_IN","The value is not in",C_OperatorType.NOT_IN));
}};
static ArrayList<Operation> operationsBoolean = new ArrayList<Operation>() {
protected ArrayList<Operation> operationsBoolean = new ArrayList<Operation>() {
private static final long serialVersionUID = -1095217157799110522L;
@ -68,7 +68,7 @@ public class OperationsStore {
}};
static ArrayList<Operation> operationsDate = new ArrayList<Operation>() {
protected ArrayList<Operation> operationsDate = new ArrayList<Operation>() {
private static final long serialVersionUID = -1095217157799110522L;
@ -91,7 +91,7 @@ public class OperationsStore {
}};
static ArrayList<Operation> operationsGeometry = new ArrayList<Operation>() {
protected ArrayList<Operation> operationsGeometry = new ArrayList<Operation>() {
private static final long serialVersionUID = -1095217157799110522L;
@ -116,7 +116,7 @@ public class OperationsStore {
public static ArrayList<Operation> getAll(String dataTypeName){
public ArrayList<Operation> getAll(String dataTypeName){
if(dataTypeName.compareTo("Boolean")==0){
operations=operationsBoolean;
} else {