From 4d658f7e60769f54d1351946f7ebfb47b3ce0c04 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 12 Oct 2020 17:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=B0=86StoreProced?= =?UTF-8?q?ureDataWrapper=E4=B8=AD=E6=97=A0=E7=94=A8=E7=9A=84dialog?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E5=8E=9F=E6=9C=AC=E4=BB=A5dialog=E4=B8=BA?= =?UTF-8?q?=E7=88=B6=E7=AA=97=E5=8F=A3=E7=9A=84=E4=B8=A4=E4=B8=AAAutoProgr?= =?UTF-8?q?essBar=E7=9A=84=E7=88=B6=E7=AA=97=E5=8F=A3=E4=B9=9F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BAnew=20JFrame()=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E4=BA=8C=E7=BA=A7=E5=BC=B9=E7=AA=97=E8=A2=AB?= =?UTF-8?q?=E9=81=AE=E7=9B=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wrapper/StoreProcedureDataWrapper.java | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java index ff2265c8e..17fbf5788 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java @@ -7,8 +7,6 @@ import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.operator.DataOperator; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.preview.PreviewTablePane; -import com.fr.design.dialog.BasicDialog; -import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; @@ -18,6 +16,7 @@ import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import javax.swing.Icon; +import javax.swing.JFrame; import javax.swing.SwingWorker; import java.util.ArrayList; import java.util.Arrays; @@ -50,7 +49,6 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { private AutoProgressBar connectionBar; private ProcedureDataModel[] dataModels; private SwingWorker worker; - private BasicDialog dialog; private int previewModel; public StoreProcedureDataWrapper(StoreProcedure storeProcedure, String storeprocedureName, String dsName) { @@ -71,19 +69,8 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { if (needLoad) { setWorker(); } - dialog = PreviewTablePane.getInstance().getDialog(); - dialog.addDialogActionListener(new DialogActionAdapter() { - public void doOk() { - getWorker().cancel(true); - } - - public void doCancel() { - getWorker().cancel(true); - } - }); - loadingBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { + loadingBar = new AutoProgressBar(new JFrame(), Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { public void doMonitorCanceled() { - getDialog().setVisible(false); getWorker().cancel(true); } }; @@ -169,7 +156,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { */ public void previewData(final int previewModel) { this.previewModel = previewModel; - connectionBar = new AutoProgressBar(dialog, Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { + connectionBar = new AutoProgressBar(new JFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) { public void doMonitorCanceled() { connectionBar.close(); worker.cancel(true); @@ -218,10 +205,6 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { }; } - private BasicDialog getDialog() { - return this.dialog; - } - private SwingWorker getWorker() { return this.worker; }