Minor updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@86851 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c73845a9e6
commit
8b0064cd38
8
pom.xml
8
pom.xml
|
@ -103,7 +103,7 @@
|
|||
<artifactId>gxt</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- tabular-data-widget-common-event -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
|
@ -118,6 +118,12 @@
|
|||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!--tabular-data-tasks-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-tasks-widget</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- LOGGING -->
|
||||
<dependency>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package org.gcube.portlets.user.td.toolboxwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProperties;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.UIStateEvent;
|
||||
import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
|
||||
import org.gcube.portlets.user.td.taskswidget.client.panel.TdTaskManagerMainPanel;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
@ -16,6 +17,8 @@ public class ToolBox extends TabPanel {
|
|||
protected EventBus eventBus;
|
||||
protected TabularResourceProperties trProperties;
|
||||
protected ToolBoxPanel toolBoxPanel;
|
||||
protected TdTaskController tdTaskController;
|
||||
protected TdTaskManagerMainPanel tdTaskMainPanel;
|
||||
|
||||
public ToolBox(String name, EventBus eventBus, ToolBoxPanel toolBoxPanel) {
|
||||
super();
|
||||
|
@ -27,6 +30,7 @@ public class ToolBox extends TabPanel {
|
|||
setAnimScroll(true);
|
||||
setTabScroll(true);
|
||||
setCloseContextMenu(true);
|
||||
|
||||
// setResizeTabs(true);
|
||||
|
||||
}
|
||||
|
@ -34,23 +38,68 @@ public class ToolBox extends TabPanel {
|
|||
public void closeTabs() {
|
||||
Log.debug("Close ToolBox Tabs");
|
||||
remove(trProperties);
|
||||
|
||||
trProperties=null;
|
||||
// remove(tdTaskMainPanel);
|
||||
tdTaskMainPanel=null;
|
||||
tdTaskController=null;
|
||||
}
|
||||
|
||||
public void updateTabs(){
|
||||
|
||||
public void updateTabs() {
|
||||
Log.debug("Update ToolBox Tabs");
|
||||
if(trProperties!=null){
|
||||
if (trProperties != null) {
|
||||
trProperties.update();
|
||||
}
|
||||
if (tdTaskMainPanel != null) {
|
||||
if (tdTaskController != null) {
|
||||
tdTaskController.updateTasks(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openTabs() {
|
||||
Log.debug("Open ToolBox Tabs");
|
||||
addTrProperties();
|
||||
addTdTaskController();
|
||||
/*
|
||||
* Label taskLabel = new Label("Task Properties");
|
||||
* taskLabel.addStyleName("pad-text"); functionalityTab .add(taskLabel,
|
||||
* new TabItemConfig("Task", true));
|
||||
*/
|
||||
setActiveWidget(getWidget(0));
|
||||
|
||||
}
|
||||
|
||||
protected void addTrProperties() {
|
||||
TabItemConfig propertiesItemConf = new TabItemConfig("Properties", true);
|
||||
|
||||
trProperties = new TabularResourceProperties("TRProperties", eventBus);
|
||||
trProperties.setHeaderVisible(false);
|
||||
add(trProperties, propertiesItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
||||
@Override
|
||||
public void onBeforeClose(BeforeCloseEvent<Widget> event) {
|
||||
if (getWidgetCount() == 1) {
|
||||
toolBoxPanel.closePanelOnly();
|
||||
remove(trProperties);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
protected void addTdTaskController() {
|
||||
|
||||
tdTaskController = TdTaskController.getInstance();
|
||||
TdTaskController.bindCommonBus(eventBus);
|
||||
tdTaskMainPanel = tdTaskController.getMainPanel(); // This is main panel
|
||||
|
||||
TabItemConfig tdTasksItemConf = new TabItemConfig("Tasks", true);
|
||||
|
||||
// add(tdTaskMainPanel, tdTasksItemConf);
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
||||
@Override
|
||||
|
@ -64,13 +113,6 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
|
||||
/*
|
||||
* Label taskLabel = new Label("Task Properties");
|
||||
* taskLabel.addStyleName("pad-text"); functionalityTab .add(taskLabel,
|
||||
* new TabItemConfig("Task", true));
|
||||
*/
|
||||
setActiveWidget(getWidget(0));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
<inherits name='org.gcube.portlets.user.td.widgetcommonevent.WidgetCommonEvent' />
|
||||
<inherits name='org.gcube.portlets.user.td.informationwidget.Information' />
|
||||
<inherits name='org.gcube.portlets.user.td.taskswidget.TdTasksWidget' />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.td.toolboxwidget.client.ToolBoxEntry' /> -->
|
||||
|
|
Loading…
Reference in New Issue