Add Fixed TabPanel show

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@93038 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-13 10:47:03 +00:00
parent b17f8feb03
commit 5b2e4b7ffb
4 changed files with 53 additions and 70 deletions

View File

@ -414,3 +414,35 @@ 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: 23 seconds)
10% complete (ETR: 23 seconds)
20% complete (ETR: 22 seconds)
30% complete (ETR: 14 seconds)
40% complete (ETR: 10 seconds)
50% complete (ETR: 7 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 20.93 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

@ -38,7 +38,7 @@ public class ColumnExpressionPanel extends FramedPanel {
}
protected String WIDTH_MULTI = "642px";
protected String HEIGHT_MULTI = "300px";
protected String HEIGHT_MULTI = "290px";
protected String WIDTH = "648px";
protected String HEIGHT = "364px";
@ -108,6 +108,9 @@ public class ColumnExpressionPanel extends FramedPanel {
}
protected void create() {
//Important: fixed rendering of widgets
forceLayoutOnResize = true;
setBodyBorder(false);
setHeaderVisible(false);
@ -300,6 +303,7 @@ public class ColumnExpressionPanel extends FramedPanel {
}
});
flowButton
.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
break;
@ -314,7 +318,6 @@ public class ColumnExpressionPanel extends FramedPanel {
basicLayout.add(flowButton, new VerticalLayoutData(-1, 36, new Margins(
5, 2, 5, 2)));
add(basicLayout);
}

View File

@ -19,6 +19,12 @@ import com.sencha.gxt.widget.core.client.event.BeforeShowEvent.BeforeShowHandler
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 MultiColumnFilterPanel extends SimplePanel {
protected String WIDTH = "648px";
protected String HEIGHT = "444px";

View File

@ -20,21 +20,20 @@ import com.sencha.gxt.widget.core.client.TabPanel;
*/
public class MultiColumnFilterTabPanel extends TabPanel {
protected String WIDTH = "648px";
protected String HEIGHT = "300px";
protected String HEIGHT = "290px";
protected EventBus eventBus;
protected MultiColumnFilterPanel multiColumnFilterPanel;
protected ArrayList<ColumnData> columns;
protected HashMap<ColumnData, C_Expression> cexpressionList;
public MultiColumnFilterTabPanel(
MultiColumnFilterPanel multiColumnFilterPanel,
EventBus eventBus) {
MultiColumnFilterPanel multiColumnFilterPanel, EventBus eventBus) {
super();
Log.debug("Create MultiColumnFilterTabPanel");
setHeight(HEIGHT);
setWidth(WIDTH);
this.multiColumnFilterPanel=multiColumnFilterPanel;
this.multiColumnFilterPanel = multiColumnFilterPanel;
this.eventBus = eventBus;
this.columns = multiColumnFilterPanel.columns;
setBodyBorder(false);
@ -49,7 +48,7 @@ public class MultiColumnFilterTabPanel extends TabPanel {
Log.debug("Start MultiColumnFilterTabPanel Tabs");
addFilterColumnsPanel();
setActiveWidget(getWidget(0));
}
protected void addFilterColumnsPanel() {
@ -59,7 +58,7 @@ public class MultiColumnFilterTabPanel extends TabPanel {
ColumnExpressionPanel columnExpressionPanel;
for (ColumnData col : columns) {
columnFilterItemConf = new TabItemConfig(col.getLabel(), false);
if (col.getTypeCode().compareTo(
ColumnTypeCode.ANNOTATION.toString()) == 0
|| col.getTypeCode().compareTo(
@ -72,77 +71,20 @@ public class MultiColumnFilterTabPanel extends TabPanel {
ColumnTypeCode.CODENAME.toString()) == 0
|| col.getTypeCode().compareTo(
ColumnTypeCode.MEASURE.toString()) == 0) {
columnExpressionPanel = new ColumnExpressionPanel(
this, col, eventBus);
columnExpressionPanel = new ColumnExpressionPanel(this, col,
eventBus);
add(columnExpressionPanel, columnFilterItemConf);
} else {
}
}
};
protected void applyFilter(ColumnData column, C_Expression exp) {
cexpressionList.put(column, exp);
}
//TODO fix CardLayoutContainer in 3.0.1
/*
private CardLayoutContainer container = new CardLayoutContainer() {
@Override
protected Widget getParentLayoutWidget() {
return container.getParent();
};
};
@Override
public void setActiveWidget(Widget widget) {
if (activeWidget == widget) {
return;
}
if (activeWidget != null) {
activeWidget.setVisible(false);
}
if (widget != null) {
if (widget.asWidget().getParent() == this) {
activeWidget = widget;
activeWidget.setVisible(true);
// forcing causes layout to execute every time this method called
// when used with TabPanel this causes layouts to execute every time tab
// selected which is not optimal
// EXTGWT-1550, in example, a panel is collapsed then another tab is
// selected. when returning to tab with collapsed panel
// the layout executes as it was forced
// layoutRequiredThisEventLoop = true;
// forceLayout();
if (GXT.isIE6() || GXT.isIE7()) {
layoutRequiredThisEventLoop = true;
forceLayout();
} else {
doLayout();
}
} else {
activeWidget = widget;
activeWidget.setVisible(true);
add(widget);
if (widget.asWidget().getParent() == this) {
layoutRequiredThisEventLoop = true;
forceLayout();
} else {
activeWidget = null;
}
}
} else {
activeWidget = null;
}
}
*/
}