|
|
|
@ -49,6 +49,8 @@ import com.fr.design.menu.MenuDef;
|
|
|
|
|
import com.fr.design.menu.SeparatorDef; |
|
|
|
|
import com.fr.design.menu.ToolBarDef; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.design.worker.DefaultWorker; |
|
|
|
|
import com.fr.design.worker.data.TableDataResult; |
|
|
|
|
import com.fr.esd.core.strategy.config.StrategyConfig; |
|
|
|
|
import com.fr.esd.core.strategy.config.StrategyConfigHelper; |
|
|
|
|
import com.fr.esd.event.DSMapping; |
|
|
|
@ -77,10 +79,7 @@ import javax.swing.SwingUtilities;
|
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import javax.swing.ToolTipManager; |
|
|
|
|
import javax.swing.tree.TreePath; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.dnd.DnDConstants; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.KeyAdapter; |
|
|
|
@ -95,6 +94,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.concurrent.Callable; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
public class TableDataTreePane extends BasicTableDataTreePane { |
|
|
|
@ -150,6 +150,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
private TableDataSearchRemindPane remindPane; |
|
|
|
|
private TreeSearchToolbarPane toolbarPane; |
|
|
|
|
|
|
|
|
|
private BasicDialog loadingDialog; |
|
|
|
|
|
|
|
|
|
private TableDataTreePane() { |
|
|
|
|
initPane(); |
|
|
|
|
} |
|
|
|
@ -1027,7 +1029,35 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
dgEdit(getTableDataInstance().creatTableDataPane(), createDsName(getNamePrefix()), false); |
|
|
|
|
TableDataResult result = getTableDataResult(); |
|
|
|
|
if (result != null) { |
|
|
|
|
dgEditByResult(result); |
|
|
|
|
} else { |
|
|
|
|
if (loadingDialog == null) { |
|
|
|
|
TableDataLoadingPane loadingPane = new TableDataLoadingPane(); |
|
|
|
|
loadingDialog = loadingPane.showLargeWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), null); |
|
|
|
|
} |
|
|
|
|
loadingDialog.setVisible(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private TableDataResult getTableDataResult() { |
|
|
|
|
DefaultWorker<TableDataResult> worker = new DefaultWorker<TableDataResult>(() -> new TableDataResult(getTableDataInstance())) { |
|
|
|
|
@Override |
|
|
|
|
public void dealResultWhenSlowly(TableDataResult result) { |
|
|
|
|
if (loadingDialog != null) { |
|
|
|
|
loadingDialog.setVisible(false); |
|
|
|
|
} |
|
|
|
|
dgEditByResult(result); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
worker.execute(); |
|
|
|
|
return worker.getResult(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void dgEditByResult(TableDataResult result) { |
|
|
|
|
dgEdit(result.getWrapper().creatTableDataPane(), StringUtils.isEmpty(result.getName()) ? createDsName(getNamePrefix()) : result.getName(), false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|