2015-06-24 15:16:13 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package org.gcube.portlets.widgets.wsexplorer.client;
|
|
|
|
|
2015-06-25 15:52:02 +02:00
|
|
|
import com.google.gwt.user.client.ui.Composite;
|
2015-06-24 15:16:13 +02:00
|
|
|
import com.google.gwt.user.client.ui.DockPanel;
|
|
|
|
import com.google.gwt.user.client.ui.ScrollPanel;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The Class SplitPanel.
|
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* Jun 23, 2015
|
|
|
|
*/
|
2015-06-24 15:18:42 +02:00
|
|
|
public class WorkspaceExplorerPanel extends DockPanel{
|
2015-06-24 15:16:13 +02:00
|
|
|
|
|
|
|
public int width = 550;
|
2015-07-30 14:59:36 +02:00
|
|
|
// public int height = 400;
|
2015-06-30 14:52:40 +02:00
|
|
|
public int west_width = 150;
|
2015-06-24 15:16:13 +02:00
|
|
|
|
|
|
|
private ScrollPanel westPanel = new ScrollPanel();
|
|
|
|
private ScrollPanel centerScrollable = new ScrollPanel();
|
2015-07-06 12:27:48 +02:00
|
|
|
private ScrollPanel southPanel = new ScrollPanel();
|
2015-06-25 15:52:02 +02:00
|
|
|
|
2015-06-24 15:16:13 +02:00
|
|
|
/**
|
2015-06-25 15:52:02 +02:00
|
|
|
* Instantiates a new workspace explorer panel.
|
|
|
|
*
|
|
|
|
* @param splitterSize the splitter size
|
|
|
|
* @param wsExplorer the ws explorer
|
|
|
|
* @param breadcrumbs the breadcrumbs
|
|
|
|
* @param navigation the navigation
|
2015-06-24 15:16:13 +02:00
|
|
|
*/
|
2015-07-31 14:11:01 +02:00
|
|
|
public WorkspaceExplorerPanel(int splitterSize, ScrollPanel wsExplorer, Composite breadcrumbs, Composite navigation, String height) {
|
2015-06-24 15:16:13 +02:00
|
|
|
ensureDebugId("WorkspaceNavigatorPanel");
|
2015-07-31 14:25:32 +02:00
|
|
|
|
2015-06-24 15:16:13 +02:00
|
|
|
add(breadcrumbs, DockPanel.NORTH);
|
2015-12-02 18:36:58 +01:00
|
|
|
|
2015-07-06 12:27:48 +02:00
|
|
|
southPanel.ensureDebugId("SouthPanelWEP");
|
|
|
|
add(southPanel, DockPanel.SOUTH);
|
2015-07-06 17:18:23 +02:00
|
|
|
|
2015-06-24 15:16:13 +02:00
|
|
|
westPanel.setWidth(west_width+"px");
|
|
|
|
westPanel.add(navigation);
|
|
|
|
add(westPanel, DockPanel.WEST);
|
2015-07-06 12:27:48 +02:00
|
|
|
|
2015-07-31 14:11:01 +02:00
|
|
|
centerScrollable.setSize(width+"px", height);
|
2015-06-25 15:52:02 +02:00
|
|
|
centerScrollable.add(wsExplorer);
|
2015-06-24 15:16:13 +02:00
|
|
|
add(centerScrollable, DockPanel.CENTER);
|
|
|
|
}
|
|
|
|
|
2015-07-06 12:27:48 +02:00
|
|
|
/**
|
|
|
|
* @return the southPanel
|
|
|
|
*/
|
|
|
|
public ScrollPanel getSouthPanel() {
|
|
|
|
return southPanel;
|
|
|
|
}
|
|
|
|
|
2015-06-24 15:16:13 +02:00
|
|
|
/**
|
2015-06-25 15:52:02 +02:00
|
|
|
* Gets the west panel.
|
|
|
|
*
|
2015-06-24 15:16:13 +02:00
|
|
|
* @return the westPanel
|
|
|
|
*/
|
|
|
|
public ScrollPanel getWestPanel() {
|
|
|
|
return westPanel;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-25 15:52:02 +02:00
|
|
|
* Gets the center scrollable.
|
|
|
|
*
|
2015-06-24 15:16:13 +02:00
|
|
|
* @return the centerScrollable
|
|
|
|
*/
|
|
|
|
public ScrollPanel getCenterScrollable() {
|
|
|
|
return centerScrollable;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|