@ -1,6 +1,5 @@
package org.gcube.portlets.user.workspace.client.view.panels ;
import org.gcube.portal.clientcontext.client.GCubeClientContext ;
import org.gcube.portlets.user.workspace.client.ConstantsPortlet ;
import org.gcube.portlets.user.workspace.client.view.ExplorerPanel ;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBottomToolBarItem ;
@ -19,6 +18,8 @@ import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData ;
import com.extjs.gxt.ui.client.widget.layout.FitLayout ;
import com.google.gwt.user.client.Random ;
import com.google.gwt.user.client.Window ;
import com.google.gwt.user.client.ui.RootPanel ;
/ * *
* The Class GxtBorderLayoutPanel .
@ -115,7 +116,16 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// northData.setSplit(true);
northData . setMargins ( new Margins ( 0 , 0 , 1 , 0 ) ) ;
BorderLayoutData westData = new BorderLayoutData ( LayoutRegion . WEST , 330 , 330 , 400 ) ;
int treePanelWidth = 330 ;
//it makes appear the collapse header for mobiles
int leftBorder = RootPanel . get ( ConstantsPortlet . WORKSPACEDIV ) . getAbsoluteLeft ( ) ;
int rootWidth = Window . getClientWidth ( ) - 2 * leftBorder ;
if ( rootWidth < ConstantsPortlet . HIDE_TREE_PANEL_WHEN_WIDTH_LESS_THAN ) {
west . setHeaderVisible ( true ) ;
}
BorderLayoutData westData = new BorderLayoutData ( LayoutRegion . WEST , treePanelWidth , treePanelWidth , treePanelWidth + 70 ) ;
westData . setSplit ( true ) ;
westData . setCollapsible ( true ) ;
westData . setMargins ( new Margins ( 0 , 1 , 0 , 0 ) ) ;
@ -127,6 +137,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
eastData . setSplit ( true ) ;
eastData . setCollapsible ( true ) ;
eastData . setMargins ( new Margins ( 0 , 0 , 0 , 1 ) ) ;
BorderLayoutData southData = new BorderLayoutData ( LayoutRegion . SOUTH , 30 , 30 , 30 ) ;
southData . setSplit ( true ) ;
@ -136,6 +148,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
north . add ( this . searchAndFilterContainer ) ;
north . setScrollMode ( Scroll . AUTOY ) ;
west . add ( this . expPanel ) ;
north . addListener ( Events . Resize , new Listener < BoxComponentEvent > ( ) {
@ -186,6 +199,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
expPanel . getSmartFolderPanel ( ) . setSizeSmartPanel ( expPanel . getWidth ( ) - 2 , expPanel . getHeight ( ) - 29 ) ;
}
} ) ;
add ( north , northData ) ;
add ( west , westData ) ;