/** * Drop selected tables in the object tree. */ public void actionPerformed(ActionEvent e) { if (_tree != null) { List<ITableInfo> tables = _tree.getSelectedTables(); if (tables.size() > 0) { if (Dialogs.showYesNo(getApplication().getMainFrame(), MSG, TITLE)) { DeleteTablesCommand command = new DeleteTablesCommand(_tree, tables); command.execute(); } } } } }
/** * Drop selected tables in the object tree. */ public void actionPerformed(ActionEvent e) { if (_tree != null) { List<ITableInfo> tables = _tree.getSelectedTables(); if (tables.size() > 0) { if (Dialogs.showYesNo(getApplication().getMainFrame(), MSG, TITLE)) { DeleteTablesCommand command = new DeleteTablesCommand(_tree, tables); command.execute(); } } } } }
public void actionPerformed(ActionEvent evt) { if(null == sessionInfoProv.getSourceDatabaseObjects()) { return; } Frame owningFrame = SessionUtils.getOwningFrame(sessionInfoProv.getDestSession()); if(1 != sessionInfoProv.getSourceDatabaseObjects().size()) { JOptionPane.showMessageDialog(owningFrame, s_stringMgr.getString("EditPasteTableNameDlg.onlyOneTableMsg")); return; } String destTableName = null; List<ITableInfo> selectedTables = sessionInfoProv.getDestSession().getObjectTreeAPIOfActiveSessionWindow().getSelectedTables(); if(1 == selectedTables.size()) { destTableName = selectedTables.get(0).getSimpleName(); } EditPasteTableNameDlg dlg = new EditPasteTableNameDlg(owningFrame, destTableName); GUIUtils.centerWithinParent(dlg); dlg.setVisible(true); if(null == dlg.getTableName()) { return; } PasteTableUtil.excePasteTable(sessionInfoProv, app, dlg.getTableName()); System.out.println("dlg.getTableName() = " + dlg.getTableName()); }