Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@97689 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f0c427e214
commit
66a69b2684
|
@ -26,6 +26,7 @@ import com.sencha.gxt.widget.core.client.button.TextButton;
|
|||
import com.sencha.gxt.widget.core.client.event.BeforeCloseEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeCloseEvent.BeforeCloseHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
|
||||
//import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
|
||||
|
||||
public class ToolBox extends TabPanel {
|
||||
|
@ -46,7 +47,7 @@ public class ToolBox extends TabPanel {
|
|||
protected SplitColumnPanel splitColumnPanel;
|
||||
protected MergeColumnPanel mergeColumnPanel;
|
||||
protected GroupByColumnPanel groupByPanel;
|
||||
|
||||
|
||||
// protected TdTaskController tdTaskController;
|
||||
// protected DialogBox tdTaskMainWindow;
|
||||
protected FramedPanel taskPanel;
|
||||
|
@ -73,12 +74,12 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(getWidget(0));
|
||||
|
||||
}
|
||||
|
||||
public void showHelpTab(){
|
||||
|
||||
public void showHelpTab() {
|
||||
Log.debug("Show Help Tab");
|
||||
setActiveWidget(helpPanel);
|
||||
}
|
||||
|
||||
|
||||
public void openPropertiesTab() {
|
||||
Log.debug("Open Properties Tab");
|
||||
if (trProperties == null) {
|
||||
|
@ -87,16 +88,16 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(trProperties);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openHistoryTab() {
|
||||
Log.debug("Open History Tab");
|
||||
if (historyPanel == null) {
|
||||
addHistoryPanel();
|
||||
}
|
||||
}
|
||||
setActiveWidget(historyPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openColumnTypeChangeTab(TRId trId, String columnName) {
|
||||
Log.debug("Open Column Type Change Tab");
|
||||
if (changeColumnTypePanel == null) {
|
||||
|
@ -107,7 +108,7 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(changeColumnTypePanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openAddColumnTab(TRId trId) {
|
||||
Log.debug("Open Add Column Tab");
|
||||
if (addColumnPanel == null) {
|
||||
|
@ -118,8 +119,7 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(addColumnPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void openDeleteColumnTab(TRId trId, String columnName) {
|
||||
Log.debug("Open Delete Column Tab");
|
||||
if (deleteColumnPanel == null) {
|
||||
|
@ -130,7 +130,7 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(deleteColumnPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openSplitColumnTab(TRId trId, String columnName) {
|
||||
Log.debug("Open Split Column Tab");
|
||||
if (splitColumnPanel == null) {
|
||||
|
@ -141,7 +141,7 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(splitColumnPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openMergeColumnTab(TRId trId, String columnName) {
|
||||
Log.debug("Open Merge Column Tab");
|
||||
if (mergeColumnPanel == null) {
|
||||
|
@ -164,7 +164,6 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public void openLabelColumnTab(TRId trId, String columnName) {
|
||||
Log.debug("Open Label Column Tab");
|
||||
if (labelColumnPanel == null) {
|
||||
|
@ -175,7 +174,7 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(labelColumnPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openChangeTableTypeTab(TRId trId) {
|
||||
Log.debug("Open Change Table Type Tab");
|
||||
if (changeTableTypePanel == null) {
|
||||
|
@ -186,26 +185,25 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(changeTableTypePanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openValidationsTableTab(TRId trId) {
|
||||
Log.debug("Open Validations Table Tab: "+trId);
|
||||
Log.debug("Open Validations Table Tab: " + trId);
|
||||
if (validationsTablePanel == null) {
|
||||
addValidationsTablePanel(trId);
|
||||
}
|
||||
}
|
||||
setActiveWidget(validationsTablePanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openValidationsTasksTab(TRId trId) {
|
||||
Log.debug("Open Validations Tasks Tab: "+trId);
|
||||
Log.debug("Open Validations Tasks Tab: " + trId);
|
||||
if (validationsTasksPanel == null) {
|
||||
addValidationsTasksPanel(trId);
|
||||
}
|
||||
}
|
||||
setActiveWidget(validationsTasksPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openDuplicatesRowsTab(TRId trId) {
|
||||
Log.debug("Open Duplicates Rows Tab");
|
||||
if (duplicatesRowsPanel == null) {
|
||||
|
@ -216,11 +214,8 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(duplicatesRowsPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Close
|
||||
// Close
|
||||
public void closePropertiesTabs() {
|
||||
Log.debug("Close Properties Tab");
|
||||
if (trProperties != null) {
|
||||
|
@ -229,7 +224,7 @@ public class ToolBox extends TabPanel {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void closeHistoryPanel() {
|
||||
Log.debug("Close History Tab");
|
||||
if (historyPanel != null) {
|
||||
|
@ -239,7 +234,6 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public void closeChangeColumnTypePanel() {
|
||||
Log.debug("Close ChangeColumnTypePanel Tab");
|
||||
if (changeColumnTypePanel != null) {
|
||||
|
@ -255,7 +249,7 @@ public class ToolBox extends TabPanel {
|
|||
deleteColumnPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeSplitColumnPanel() {
|
||||
Log.debug("Close SplitColumnPanel Tab");
|
||||
if (splitColumnPanel != null) {
|
||||
|
@ -263,7 +257,7 @@ public class ToolBox extends TabPanel {
|
|||
splitColumnPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeMergeColumnPanel() {
|
||||
Log.debug("Close MergeColumnPanel Tab");
|
||||
if (mergeColumnPanel != null) {
|
||||
|
@ -271,7 +265,7 @@ public class ToolBox extends TabPanel {
|
|||
mergeColumnPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeGroupByPanel() {
|
||||
Log.debug("Close GroupByPanel Tab");
|
||||
if (groupByPanel != null) {
|
||||
|
@ -279,8 +273,7 @@ public class ToolBox extends TabPanel {
|
|||
groupByPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void closeAddColumnPanel() {
|
||||
Log.debug("Close AddColumnPanel Tab");
|
||||
if (addColumnPanel != null) {
|
||||
|
@ -288,7 +281,6 @@ public class ToolBox extends TabPanel {
|
|||
addColumnPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeLabelColumnPanel() {
|
||||
Log.debug("Close LabelColumnPanel Tab");
|
||||
|
@ -297,7 +289,7 @@ public class ToolBox extends TabPanel {
|
|||
labelColumnPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeChangeTableTypePanel() {
|
||||
Log.debug("Close ChangeTableTypePanel Tab");
|
||||
if (changeTableTypePanel != null) {
|
||||
|
@ -305,7 +297,7 @@ public class ToolBox extends TabPanel {
|
|||
changeTableTypePanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeValidationsTablePanel() {
|
||||
Log.debug("Close Validations Table Panel Tab");
|
||||
if (validationsTablePanel != null) {
|
||||
|
@ -313,7 +305,7 @@ public class ToolBox extends TabPanel {
|
|||
validationsTablePanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeValidationsTasksPanel() {
|
||||
Log.debug("Close Validations Tasks Panel Tab");
|
||||
if (validationsTasksPanel != null) {
|
||||
|
@ -321,8 +313,7 @@ public class ToolBox extends TabPanel {
|
|||
validationsTasksPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void closeDuplicatesRowsPanel() {
|
||||
Log.debug("Close DuplicatesRowsPanel Tab");
|
||||
if (duplicatesRowsPanel != null) {
|
||||
|
@ -330,9 +321,7 @@ public class ToolBox extends TabPanel {
|
|||
duplicatesRowsPanel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void updateTabs() {
|
||||
Log.debug("Update ToolBox Tabs");
|
||||
if (trProperties != null) {
|
||||
|
@ -341,17 +330,17 @@ public class ToolBox extends TabPanel {
|
|||
if (historyPanel != null) {
|
||||
historyPanel.update();
|
||||
}
|
||||
|
||||
|
||||
if (validationsTablePanel != null) {
|
||||
validationsTablePanel.update();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (validationsTasksPanel != null) {
|
||||
validationsTasksPanel.update();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (changeColumnTypePanel != null) {
|
||||
remove(changeColumnTypePanel);
|
||||
changeColumnTypePanel = null;
|
||||
|
@ -360,28 +349,27 @@ public class ToolBox extends TabPanel {
|
|||
remove(deleteColumnPanel);
|
||||
deleteColumnPanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (splitColumnPanel != null) {
|
||||
remove(splitColumnPanel);
|
||||
splitColumnPanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (mergeColumnPanel != null) {
|
||||
remove(mergeColumnPanel);
|
||||
mergeColumnPanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (groupByPanel != null) {
|
||||
remove(groupByPanel);
|
||||
groupByPanel = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (addColumnPanel != null) {
|
||||
remove(addColumnPanel);
|
||||
addColumnPanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (labelColumnPanel != null) {
|
||||
remove(labelColumnPanel);
|
||||
labelColumnPanel = null;
|
||||
|
@ -390,13 +378,11 @@ public class ToolBox extends TabPanel {
|
|||
remove(changeTableTypePanel);
|
||||
changeTableTypePanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (duplicatesRowsPanel != null) {
|
||||
remove(duplicatesRowsPanel);
|
||||
duplicatesRowsPanel = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -427,7 +413,7 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
protected void addHistoryPanel() {
|
||||
TabItemConfig historyPanelItemConf = new TabItemConfig("History", true);
|
||||
|
||||
|
@ -445,7 +431,6 @@ public class ToolBox extends TabPanel {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
protected void addChangeColumnTypePanel(TRId trId, String columnName) {
|
||||
TabItemConfig changeColumnTypeItemConf = new TabItemConfig(
|
||||
"Column Type", true);
|
||||
|
@ -468,13 +453,10 @@ public class ToolBox extends TabPanel {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
protected void addAddColumnPanel(TRId trId) {
|
||||
TabItemConfig addColumnItemConf = new TabItemConfig(
|
||||
"Add Column", true);
|
||||
TabItemConfig addColumnItemConf = new TabItemConfig("Add Column", true);
|
||||
|
||||
addColumnPanel = new AddColumnPanel(trId,eventBus);
|
||||
addColumnPanel = new AddColumnPanel(trId, eventBus);
|
||||
add(addColumnPanel, addColumnItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -491,14 +473,11 @@ public class ToolBox extends TabPanel {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
protected void addDeleteColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig deleteColumnItemConf = new TabItemConfig(
|
||||
"Column Delete", true);
|
||||
TabItemConfig deleteColumnItemConf = new TabItemConfig("Column Delete",
|
||||
true);
|
||||
|
||||
deleteColumnPanel = new DeleteColumnPanel(trId, columnName,
|
||||
eventBus);
|
||||
deleteColumnPanel = new DeleteColumnPanel(trId, columnName, eventBus);
|
||||
add(deleteColumnPanel, deleteColumnItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -516,11 +495,10 @@ public class ToolBox extends TabPanel {
|
|||
};
|
||||
|
||||
protected void addSplitColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig splitColumnItemConf = new TabItemConfig(
|
||||
"Column Split", true);
|
||||
TabItemConfig splitColumnItemConf = new TabItemConfig("Column Split",
|
||||
true);
|
||||
|
||||
splitColumnPanel = new SplitColumnPanel(trId, columnName,
|
||||
eventBus);
|
||||
splitColumnPanel = new SplitColumnPanel(trId, columnName, eventBus);
|
||||
add(splitColumnPanel, splitColumnItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -536,14 +514,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
protected void addMergeColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig mergeColumnItemConf = new TabItemConfig(
|
||||
"Column Merge", true);
|
||||
|
||||
mergeColumnPanel = new MergeColumnPanel(trId, columnName,
|
||||
eventBus);
|
||||
protected void addMergeColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig mergeColumnItemConf = new TabItemConfig("Column Merge",
|
||||
true);
|
||||
|
||||
mergeColumnPanel = new MergeColumnPanel(trId, columnName, eventBus);
|
||||
add(mergeColumnPanel, mergeColumnItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -559,13 +535,17 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
protected void addGroupByPanel(TRId trId, String columnName) {
|
||||
TabItemConfig groupByItemConf = new TabItemConfig(
|
||||
"Group By", true);
|
||||
|
||||
groupByPanel = new GroupByColumnPanel(trId, columnName,
|
||||
eventBus);
|
||||
protected void addGroupByPanel(TRId trId, String columnName) {
|
||||
TabItemConfig groupByItemConf = new TabItemConfig("Group By", true);
|
||||
|
||||
try {
|
||||
groupByPanel = new GroupByColumnPanel(trId, columnName, eventBus);
|
||||
} catch (Throwable e) {
|
||||
Log.error("Error Creating GroupBy Panel:" + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
add(groupByPanel, groupByItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -581,14 +561,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
protected void addLabelColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig labelColumnItemConf = new TabItemConfig(
|
||||
"Column Label", true);
|
||||
|
||||
labelColumnPanel = new LabelColumnPanel(trId, columnName,
|
||||
eventBus);
|
||||
protected void addLabelColumnPanel(TRId trId, String columnName) {
|
||||
TabItemConfig labelColumnItemConf = new TabItemConfig("Column Label",
|
||||
true);
|
||||
|
||||
labelColumnPanel = new LabelColumnPanel(trId, columnName, eventBus);
|
||||
add(labelColumnPanel, labelColumnItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -604,13 +582,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
protected void addChangeTableTypePanel(TRId trId) {
|
||||
TabItemConfig changeTableTypeItemConf = new TabItemConfig(
|
||||
"Table Type", true);
|
||||
|
||||
changeTableTypePanel = new ChangeTableTypePanel(trId,
|
||||
eventBus);
|
||||
protected void addChangeTableTypePanel(TRId trId) {
|
||||
TabItemConfig changeTableTypeItemConf = new TabItemConfig("Table Type",
|
||||
true);
|
||||
|
||||
changeTableTypePanel = new ChangeTableTypePanel(trId, eventBus);
|
||||
add(changeTableTypePanel, changeTableTypeItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -626,14 +603,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
protected void addValidationsTablePanel(TRId trId) {
|
||||
TabItemConfig validationsTableItemConf = new TabItemConfig(
|
||||
"Validations", true);
|
||||
|
||||
validationsTablePanel = new ValidationsTablePanel(trId,
|
||||
eventBus);
|
||||
validationsTablePanel = new ValidationsTablePanel(trId, eventBus);
|
||||
add(validationsTablePanel, validationsTableItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -649,13 +624,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
protected void addValidationsTasksPanel(TRId trId) {
|
||||
TabItemConfig validationsTasksItemConf = new TabItemConfig(
|
||||
"Validations", true);
|
||||
|
||||
validationsTasksPanel = new ValidationsTasksPanel(trId,
|
||||
eventBus);
|
||||
validationsTasksPanel = new ValidationsTasksPanel(trId, eventBus);
|
||||
add(validationsTasksPanel, validationsTasksItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -671,15 +645,12 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
protected void addDuplicatesRowsPanel(TRId trId) {
|
||||
TabItemConfig duplicatesRowsDeleteItemConf = new TabItemConfig(
|
||||
"Duplicate", true);
|
||||
|
||||
duplicatesRowsPanel = new DuplicatesRowsPanel(trId,
|
||||
eventBus);
|
||||
duplicatesRowsPanel = new DuplicatesRowsPanel(trId, eventBus);
|
||||
add(duplicatesRowsPanel, duplicatesRowsDeleteItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
@ -695,13 +666,9 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void addTdTaskPanel() {
|
||||
//TODO
|
||||
// TODO
|
||||
// tdTaskController = TdTaskController.getInstance();
|
||||
// tdTaskController.bindCommonBus(eventBus);
|
||||
// tdTaskMainWindow = tdTaskController.getWindowTaskMonitor(); // This
|
||||
|
|
Loading…
Reference in New Issue