Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@94863 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7181e800d2
commit
824b28ba26
|
@ -5,6 +5,7 @@ import org.gcube.portlets.user.td.columnwidget.client.DeleteColumnPanel;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.LabelColumnPanel;
|
import org.gcube.portlets.user.td.columnwidget.client.LabelColumnPanel;
|
||||||
import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProperties;
|
import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProperties;
|
||||||
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.rows.DuplicatesRowsPanel;
|
import org.gcube.portlets.user.td.tablewidget.client.rows.DuplicatesRowsPanel;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.validation.ValidationsTablePanel;
|
import org.gcube.portlets.user.td.tablewidget.client.validation.ValidationsTablePanel;
|
||||||
import org.gcube.portlets.user.td.toolboxwidget.client.help.HelpPanel;
|
import org.gcube.portlets.user.td.toolboxwidget.client.help.HelpPanel;
|
||||||
|
@ -35,6 +36,7 @@ public class ToolBox extends TabPanel {
|
||||||
protected ChangeTableTypePanel changeTableTypePanel;
|
protected ChangeTableTypePanel changeTableTypePanel;
|
||||||
protected ValidationsTablePanel validationsTablePanel;
|
protected ValidationsTablePanel validationsTablePanel;
|
||||||
protected DuplicatesRowsPanel duplicatesRowsPanel;
|
protected DuplicatesRowsPanel duplicatesRowsPanel;
|
||||||
|
protected HistoryPanel historyPanel;
|
||||||
|
|
||||||
// protected TdTaskController tdTaskController;
|
// protected TdTaskController tdTaskController;
|
||||||
// protected DialogBox tdTaskMainWindow;
|
// protected DialogBox tdTaskMainWindow;
|
||||||
|
@ -76,7 +78,18 @@ public class ToolBox extends TabPanel {
|
||||||
setActiveWidget(trProperties);
|
setActiveWidget(trProperties);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void openHistoryTab() {
|
||||||
|
Log.debug("Open History Tab");
|
||||||
|
if (historyPanel == null) {
|
||||||
|
addHistoryPanel();
|
||||||
|
} else {
|
||||||
|
historyPanel.update();
|
||||||
|
}
|
||||||
|
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");
|
||||||
if (changeColumnTypePanel == null) {
|
if (changeColumnTypePanel == null) {
|
||||||
|
@ -154,7 +167,17 @@ public class ToolBox extends TabPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void closeHistoryPanel() {
|
||||||
|
Log.debug("Close History Tab");
|
||||||
|
if (historyPanel != null) {
|
||||||
|
remove(historyPanel);
|
||||||
|
historyPanel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void closeChangeColumnTypePanel() {
|
public void closeChangeColumnTypePanel() {
|
||||||
Log.debug("Close ChangeColumnTypePanel Tab");
|
Log.debug("Close ChangeColumnTypePanel Tab");
|
||||||
if (changeColumnTypePanel != null) {
|
if (changeColumnTypePanel != null) {
|
||||||
|
@ -211,6 +234,10 @@ public class ToolBox extends TabPanel {
|
||||||
if (trProperties != null) {
|
if (trProperties != null) {
|
||||||
trProperties.update();
|
trProperties.update();
|
||||||
}
|
}
|
||||||
|
if (historyPanel != null) {
|
||||||
|
historyPanel.update();
|
||||||
|
}
|
||||||
|
|
||||||
if (changeColumnTypePanel != null) {
|
if (changeColumnTypePanel != null) {
|
||||||
remove(changeColumnTypePanel);
|
remove(changeColumnTypePanel);
|
||||||
changeColumnTypePanel = null;
|
changeColumnTypePanel = null;
|
||||||
|
@ -268,7 +295,26 @@ public class ToolBox extends TabPanel {
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected void addHistoryPanel() {
|
||||||
|
TabItemConfig historyPanelItemConf = new TabItemConfig("History", true);
|
||||||
|
|
||||||
|
historyPanel = new HistoryPanel(eventBus);
|
||||||
|
add(historyPanel, historyPanelItemConf);
|
||||||
|
|
||||||
|
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||||
|
|
||||||
|
public void onBeforeClose(BeforeCloseEvent<Widget> event) {
|
||||||
|
if (historyPanel == event.getItem()) {
|
||||||
|
remove(historyPanel);
|
||||||
|
historyPanel = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
protected void addChangeColumnTypePanel(TRId trId, String columnName) {
|
protected void addChangeColumnTypePanel(TRId trId, String columnName) {
|
||||||
TabItemConfig changeColumnTypeItemConf = new TabItemConfig(
|
TabItemConfig changeColumnTypeItemConf = new TabItemConfig(
|
||||||
"Column Type", true);
|
"Column Type", true);
|
||||||
|
|
|
@ -80,6 +80,10 @@ public class ToolBoxPanel extends ContentPanel {
|
||||||
break;
|
break;
|
||||||
case HELP:
|
case HELP:
|
||||||
doHelpTab();
|
doHelpTab();
|
||||||
|
break;
|
||||||
|
case HISTORY:
|
||||||
|
doHistoryTab();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -136,6 +140,22 @@ public class ToolBoxPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void doHistoryTab(){
|
||||||
|
if (uiStateType == UIStateType.TR_OPEN) {
|
||||||
|
if (state == ToolBoxPanelState.OPENED) {
|
||||||
|
toolBox.openHistoryTab();
|
||||||
|
Log.debug("ToolBoxPanelSTate.OPENED Add Tabs");
|
||||||
|
} else {
|
||||||
|
enable();
|
||||||
|
expand();
|
||||||
|
state = ToolBoxPanelState.OPENED;
|
||||||
|
toolBox.openHistoryTab();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.debug("ToolBoxPanel No table open");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void doColumnTypeChangeTab(WidgetRequestEvent event){
|
protected void doColumnTypeChangeTab(WidgetRequestEvent event){
|
||||||
Log.debug("WidgetRequestEvent.CHANGECOLUMNTYPEPANEL : ["+event.getTrId()+" ,columnName: "+event.getColumnName()+"]");
|
Log.debug("WidgetRequestEvent.CHANGECOLUMNTYPEPANEL : ["+event.getTrId()+" ,columnName: "+event.getColumnName()+"]");
|
||||||
if (uiStateType == UIStateType.TR_OPEN) {
|
if (uiStateType == UIStateType.TR_OPEN) {
|
||||||
|
@ -276,6 +296,7 @@ public class ToolBoxPanel extends ContentPanel {
|
||||||
|
|
||||||
public void closePanel(){
|
public void closePanel(){
|
||||||
toolBox.closePropertiesTabs();
|
toolBox.closePropertiesTabs();
|
||||||
|
toolBox.closeHistoryPanel();
|
||||||
toolBox.closeChangeColumnTypePanel();
|
toolBox.closeChangeColumnTypePanel();
|
||||||
toolBox.closeDeleteColumnPanel();
|
toolBox.closeDeleteColumnPanel();
|
||||||
toolBox.closeLabelColumnPanel();
|
toolBox.closeLabelColumnPanel();
|
||||||
|
|
Loading…
Reference in New Issue