Fixed window width

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@86193 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-11-26 14:40:58 +00:00
parent 4c8fdfbf67
commit fa0b7af3ad
2 changed files with 12 additions and 3 deletions

View File

@ -12,7 +12,9 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer;
import com.sencha.gxt.widget.core.client.container.Viewport.ViewportAppearance;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class PortalViewport extends SimpleContainer {
@ -57,7 +59,7 @@ public class PortalViewport extends SimpleContainer {
*
* @return true if window scrolling is enabled
*/
public boolean getEnableScroll() {
public boolean isEnableScroll() {
return enableScroll;
}
@ -96,7 +98,13 @@ public class PortalViewport extends SimpleContainer {
}
protected void resize() {
int viewWidth = calculateWidth() - rightScrollBarSize;
int viewWidth;
if(enableScroll){
viewWidth= calculateWidth() - rightScrollBarSize;
} else {
viewWidth = calculateWidth();
}
int viewHeight = calculateHeight();
Log.info("TDM resize viewWidth: " + viewWidth + " viewHeight: "
+ viewHeight + " clientWidth: " + Window.getClientWidth()

View File

@ -169,6 +169,7 @@ public class TabularDataPortlet implements EntryPoint {
+ " found, starting in portal mode");
PortalViewport viewport = new PortalViewport();
Log.info("Created Viewport");
viewport.setEnableScroll(false);
viewport.setWidget(mainWidget);
Log.info("Set Widget");
Log.info("getOffsetWidth(): " + viewport.getOffsetWidth());