Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@92210 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
76e2f5db29
commit
45bae9ec7d
|
@ -20,6 +20,8 @@ import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
|||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeShowEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeShowEvent.BeforeShowHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||
|
@ -45,8 +47,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
protected ColumnExpressionDialog parentRuleDialog;
|
||||
protected ColumnFilterDialog parentFilterDialog;
|
||||
protected MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel;
|
||||
|
||||
|
||||
|
||||
protected ColumnData column;
|
||||
protected ConditionWidget conditionWidget;
|
||||
|
||||
|
@ -55,7 +56,8 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
private TextButton btnSave;
|
||||
private TextButton btnClose;
|
||||
|
||||
public ColumnExpressionPanel(MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel,
|
||||
public ColumnExpressionPanel(
|
||||
MultiColumnFilterTabPanel parentMultiColumnFilterTabPanel,
|
||||
ColumnData column, EventBus eventBus) {
|
||||
super();
|
||||
type = ColumnExpressionPanelType.MultiColumnFilter;
|
||||
|
@ -66,7 +68,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
create();
|
||||
}
|
||||
|
||||
|
||||
public ColumnExpressionPanel(ColumnFilterDialog parentFilterDialog,
|
||||
ColumnData column, EventBus eventBus) {
|
||||
super();
|
||||
|
@ -99,7 +101,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
protected void create() {
|
||||
setBodyBorder(false);
|
||||
setHeaderVisible(false);
|
||||
|
||||
|
||||
VerticalLayoutContainer basicLayout = new VerticalLayoutContainer();
|
||||
basicLayout.setScrollMode(ScrollMode.AUTO);
|
||||
basicLayout.setAdjustForScroll(true);
|
||||
|
@ -293,8 +295,19 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
basicLayout.add(flowButton, new VerticalLayoutData(1, -1, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
add(basicLayout);
|
||||
|
||||
|
||||
|
||||
addBeforeShowHandler(new BeforeShowHandler() {
|
||||
|
||||
@Override
|
||||
public void onBeforeShow(BeforeShowEvent event) {
|
||||
conditionWidget.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
show();
|
||||
|
||||
}
|
||||
|
||||
protected void applyRule() {
|
||||
|
@ -321,16 +334,11 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
parentFilterDialog.applyFilter(exp);
|
||||
break;
|
||||
case MultiColumnFilter:
|
||||
parentMultiColumnFilterTabPanel.applyFilter(column,exp);
|
||||
parentMultiColumnFilterTabPanel.applyFilter(column, exp);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -362,6 +370,4 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
|||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeShowEvent;
|
||||
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||
import com.sencha.gxt.widget.core.client.form.Radio;
|
||||
|
@ -111,6 +112,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
baseLayout.add(vert, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||
add(baseLayout);
|
||||
show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -176,7 +178,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
Log.debug("Store created");
|
||||
ComboBox<Operation> comboOp = new ComboBox<Operation>(storeOp,
|
||||
props.label());
|
||||
|
||||
|
||||
Log.debug("Combo created");
|
||||
|
||||
comboOp.addSelectionHandler(new SelectionHandler<Operation>() {
|
||||
|
@ -251,7 +253,15 @@ public class ConditionWidget extends SimpleContainer {
|
|||
horiz.add(btnDel, new BoxLayoutData(new Margins(2, 0, 2, 0)));
|
||||
|
||||
vert.add(horiz, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
|
||||
|
||||
addBeforeShowHandler(new BeforeShowEvent.BeforeShowHandler() {
|
||||
|
||||
@Override
|
||||
public void onBeforeShow(BeforeShowEvent event) {
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,19 +68,10 @@ public class MultiColumnFilterTabPanel extends TabPanel {
|
|||
ColumnTypeCode.CODENAME.toString()) == 0
|
||||
|| col.getTypeCode().compareTo(
|
||||
ColumnTypeCode.MEASURE.toString()) == 0) {
|
||||
final ColumnExpressionPanel columnExpressionPanel = new ColumnExpressionPanel(this, col,
|
||||
eventBus);
|
||||
final ColumnExpressionPanel columnExpressionPanel = new ColumnExpressionPanel(
|
||||
this, col, eventBus);
|
||||
add(columnExpressionPanel, columnFilterItemConf);
|
||||
|
||||
columnExpressionPanel
|
||||
.addBeforeShowHandler(new BeforeShowHandler() {
|
||||
|
||||
@Override
|
||||
public void onBeforeShow(BeforeShowEvent event) {
|
||||
columnExpressionPanel.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue