From 18dc43a8749172f86a8407da9d82e6ca53266b6b Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 16 Oct 2019 13:02:54 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-22824=20=E8=AE=BE=E8=AE=A1=E5=99=A8=20ma?= =?UTF-8?q?c=E4=B8=8B=20=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=20=E7=82=B9=E5=87=BB=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=90=8E=20=E4=B8=8D=E5=87=BA=E7=8E=B0=E5=9C=A8=E6=9C=80?= =?UTF-8?q?=E9=A1=B6=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/preview/PreviewTablePane.java | 13 +++---------- .../tabledata/tabledatapane/FileTableDataPane.java | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java index 383a1f02a..8fdd09f13 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java @@ -27,15 +27,7 @@ import com.fr.function.TIME; import com.fr.general.FRFont; import com.fr.log.FineLoggerFactory; -import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.JComponent; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTable; -import javax.swing.SwingWorker; -import javax.swing.UIManager; +import javax.swing.*; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; @@ -48,6 +40,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; @@ -163,7 +156,7 @@ public class PreviewTablePane extends BasicPane { this.add(new JScrollPane(preveiwTable), BorderLayout.CENTER); if (this.dialog == null) { - this.dialog = this.showWindow(DesignerContext.getDesignerFrame()); + this.dialog = this.showWindow(new JFrame()); } progressBar = new AutoProgressBar(this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) { public void doMonitorCanceled() { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index 0d8b05c40..fdee7fb8a 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -438,7 +438,7 @@ public class FileTableDataPane extends AbstractTableDataPane { @Override public void actionPerformed(ActionEvent e) { FILEChooserPane fileChooser = FILEChooserPane.getInstance(true, false, new ChooseFileFilter(getFileSuffix())); - if (fileChooser.showOpenDialog(DesignerContext.getDesignerFrame()) == FILEChooserPane.OK_OPTION) { + if (fileChooser.showOpenDialog(FileTableDataPane.this) == FILEChooserPane.OK_OPTION) { final FILE file = fileChooser.getSelectedFILE(); if (file == null) {// 选择的文件不能是 null return;