Added Resources

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@100519 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-10-08 10:48:43 +00:00 committed by Giancarlo Panichi
parent e5097beb37
commit f4ea1faf66
5 changed files with 155 additions and 62 deletions

View File

@ -154,6 +154,14 @@
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version> <version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- tabular-data-resources-widget -->
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-resources-widget</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<!-- tabular-data-column-operation-widget --> <!-- tabular-data-column-operation-widget -->
<dependency> <dependency>

View File

@ -1,36 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module rename-to='ToolBox'> <module rename-to='ToolBox'>
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<!-- We need the JUnit module in the main module, --> <!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) --> <!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' /> <inherits name='com.google.gwt.junit.JUnit' />
<!-- Inherit the default GWT style sheet. You can change --> <!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting --> <!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. --> <!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' /> <inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> --> <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' /> <inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> --> <!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" /> <inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<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.columnwidget.ColumnWidget' />
<inherits name='org.gcube.portlets.user.td.tablewidget.TableWidget'/>
<!-- <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' /> -->
<!-- Specify the paths for translatable code --> <inherits
<source path='client' /> name='org.gcube.portlets.user.td.widgetcommonevent.WidgetCommonEvent' />
<source path='shared' /> <inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
<inherits name='org.gcube.portlets.user.td.informationwidget.Information' />
<inherits name='org.gcube.portlets.user.td.columnwidget.ColumnWidget' />
<inherits name='org.gcube.portlets.user.td.resourceswidget.ResourcesWidget' />
<inherits name='org.gcube.portlets.user.td.tablewidget.TableWidget' />
<inherits name='org.gcube.portlets.user.tdcolumnoperation.TdColumnOperation' />
<!-- <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'
/> -->
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module> </module>

View File

@ -6,6 +6,7 @@ import org.gcube.portlets.user.td.columnwidget.client.LabelColumnPanel;
import org.gcube.portlets.user.td.columnwidget.client.create.AddColumnPanel; import org.gcube.portlets.user.td.columnwidget.client.create.AddColumnPanel;
import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProperties; import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProperties;
import org.gcube.portlets.user.td.monitorwidget.client.background.MonitorBackgroundPanel; import org.gcube.portlets.user.td.monitorwidget.client.background.MonitorBackgroundPanel;
import org.gcube.portlets.user.td.resourceswidget.client.ResourcesPanel;
import org.gcube.portlets.user.td.tablewidget.client.ChangeTableTypePanel; import org.gcube.portlets.user.td.tablewidget.client.ChangeTableTypePanel;
import org.gcube.portlets.user.td.tablewidget.client.history.HistoryPanel; import org.gcube.portlets.user.td.tablewidget.client.history.HistoryPanel;
import org.gcube.portlets.user.td.tablewidget.client.normalize.DenormalizePanel; import org.gcube.portlets.user.td.tablewidget.client.normalize.DenormalizePanel;
@ -53,6 +54,7 @@ public class ToolBox extends TabPanel {
protected NormalizePanel normalizePanel; protected NormalizePanel normalizePanel;
protected DenormalizePanel denormalizePanel; protected DenormalizePanel denormalizePanel;
protected MonitorBackgroundPanel monitorBackgroundPanel; protected MonitorBackgroundPanel monitorBackgroundPanel;
protected ResourcesPanel resourcesPanel;
// protected TdTaskController tdTaskController; // protected TdTaskController tdTaskController;
// protected DialogBox tdTaskMainWindow; // protected DialogBox tdTaskMainWindow;
@ -111,6 +113,9 @@ public class ToolBox extends TabPanel {
setActiveWidget(historyPanel); setActiveWidget(historyPanel);
} }
public void openColumnTypeChangeTab(TRId trId, String columnName) { public void openColumnTypeChangeTab(TRId trId, String columnName) {
Log.debug("Open Column Type Change Tab"); Log.debug("Open Column Type Change Tab");
@ -250,6 +255,15 @@ public class ToolBox extends TabPanel {
setActiveWidget(duplicatesRowsPanel); setActiveWidget(duplicatesRowsPanel);
} }
public void openResourcesTab(TRId trId) {
Log.debug("Open Resources Tab");
if (resourcesPanel == null) {
addResourcesPanel(trId);
}
setActiveWidget(resourcesPanel);
}
// Close // Close
public void closePropertiesTabs() { public void closePropertiesTabs() {
@ -383,7 +397,18 @@ public class ToolBox extends TabPanel {
denormalizePanel = null; denormalizePanel = null;
} }
} }
public void closeResourcesPanel() {
Log.debug("Close ResourcesPanel Tab");
if (resourcesPanel != null) {
remove(resourcesPanel);
resourcesPanel = null;
}
}
//
public void updateTabs() { public void updateTabs() {
try { try {
Log.debug("Update ToolBox Tabs"); Log.debug("Update ToolBox Tabs");
@ -407,8 +432,14 @@ public class ToolBox extends TabPanel {
if (validationsTasksPanel != null) { if (validationsTasksPanel != null) {
validationsTasksPanel.update(); validationsTasksPanel.update();
//validationsTasksPanel.forceLayout();
} }
if (resourcesPanel != null) {
resourcesPanel.update();
}
if (changeColumnTypePanel != null) { if (changeColumnTypePanel != null) {
remove(changeColumnTypePanel); remove(changeColumnTypePanel);
@ -748,6 +779,28 @@ public class ToolBox extends TabPanel {
}); });
}; };
protected void addResourcesPanel(TRId trId) {
TabItemConfig resourcesItemConf = new TabItemConfig(
"Resources", true);
resourcesPanel = new ResourcesPanel(trId, eventBus);
add(resourcesPanel, resourcesItemConf);
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
public void onBeforeClose(BeforeCloseEvent<Widget> event) {
if (resourcesPanel == event.getItem()) {
remove(resourcesPanel);
resourcesPanel = null;
}
}
});
};
protected void addDuplicatesRowsPanel(TRId trId) { protected void addDuplicatesRowsPanel(TRId trId) {
TabItemConfig duplicatesRowsDeleteItemConf = new TabItemConfig( TabItemConfig duplicatesRowsDeleteItemConf = new TabItemConfig(

View File

@ -157,10 +157,12 @@ public class ToolBoxPanel extends ContentPanel {
case DENORMALIZEPANEL: case DENORMALIZEPANEL:
doDenormalizeTab(event); doDenormalizeTab(event);
break; break;
case MONITORBACKGROUNDPANEL: case MONITORBACKGROUNDPANEL:
doMonitorBackgroundTab(event); doMonitorBackgroundTab(event);
break; break;
case RESOURCESPANEL:
doResourcesTab(event);
break;
default: default:
break; break;
@ -414,6 +416,26 @@ public class ToolBoxPanel extends ContentPanel {
Log.debug("ToolBoxPanel No table open"); Log.debug("ToolBoxPanel No table open");
} }
} }
protected void doResourcesTab(WidgetRequestEvent event) {
Log.debug("WidgetRequestEvent.ResourcesPanel : ["
+ event.getTrId() + "]");
if (uiStateType == UIStateType.TR_OPEN
|| uiStateType == UIStateType.TABLECURATION
|| uiStateType == UIStateType.TABLEUPDATE) {
if (state == ToolBoxPanelState.OPENED) {
toolBox.openResourcesTab(event.getTrId());
Log.debug("ToolBoxPanelSTate.OPENED Add Tabs");
} else {
enable();
expand();
state = ToolBoxPanelState.OPENED;
toolBox.openResourcesTab(event.getTrId());
}
} else {
Log.debug("ToolBoxPanel No table open");
}
}
protected void doNormalizeTab(WidgetRequestEvent event) { protected void doNormalizeTab(WidgetRequestEvent event) {
Log.debug("WidgetRequestEvent.NoramlizePanel : [" + event.getTrId() Log.debug("WidgetRequestEvent.NoramlizePanel : [" + event.getTrId()
@ -517,6 +539,7 @@ public class ToolBoxPanel extends ContentPanel {
toolBox.closeValidationsTasksPanel(); toolBox.closeValidationsTasksPanel();
toolBox.closeNormalizePanel(); toolBox.closeNormalizePanel();
toolBox.closeDenormalizePanel(); toolBox.closeDenormalizePanel();
toolBox.closeResourcesPanel();
Log.debug("ToolBoxPanel Closed"); Log.debug("ToolBoxPanel Closed");
} }

View File

@ -1,40 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module rename-to='ToolBox'> <module rename-to='ToolBox'>
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<!-- We need the JUnit module in the main module, --> <!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) --> <!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' /> <inherits name='com.google.gwt.junit.JUnit' />
<!-- Inherit the default GWT style sheet. You can change --> <!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting --> <!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. --> <!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' /> <inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> --> <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' /> <inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> --> <!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" /> <inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<inherits name='org.gcube.portlets.user.td.widgetcommonevent.WidgetCommonEvent' />
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
<inherits name='org.gcube.portlets.user.td.informationwidget.Information' />
<inherits name='org.gcube.portlets.user.td.columnwidget.ColumnWidget' />
<inherits name='org.gcube.portlets.user.td.tablewidget.TableWidget'/>
<inherits name='org.gcube.portlets.user.tdcolumnoperation.TdColumnOperation'/>
<!-- <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' /> -->
<!-- Specify the paths for translatable code --> <inherits
<source path='client' /> name='org.gcube.portlets.user.td.widgetcommonevent.WidgetCommonEvent' />
<source path='shared' /> <inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
<inherits name='org.gcube.portlets.user.td.informationwidget.Information' />
<inherits name='org.gcube.portlets.user.td.columnwidget.ColumnWidget' />
<inherits name='org.gcube.portlets.user.td.resourceswidget.ResourcesWidget' />
<inherits name='org.gcube.portlets.user.td.tablewidget.TableWidget' />
<inherits name='org.gcube.portlets.user.tdcolumnoperation.TdColumnOperation' />
<!-- <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'
/> -->
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module> </module>