From 51bdaf47b6150f2155ab611c97b2bac6178f2a1f Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 24 May 2016 12:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E7=AA=97=E5=8F=A3=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginShopDialog.java | 10 ++++++++-- .../src/com/fr/design/extra/PluginWebBridge.java | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginShopDialog.java b/designer_base/src/com/fr/design/extra/PluginShopDialog.java index 01e966116..f2e1e93ec 100644 --- a/designer_base/src/com/fr/design/extra/PluginShopDialog.java +++ b/designer_base/src/com/fr/design/extra/PluginShopDialog.java @@ -4,17 +4,23 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.UIDialog; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; +import javafx.embed.swing.JFXPanel; +import javax.swing.*; import java.awt.*; /** * Created by vito on 16/4/18. */ public class PluginShopDialog extends UIDialog { - private static final Dimension DEFAULT_SHOP = new Dimension(900, 684); + private static final Dimension DEFAULT_SHOP = new Dimension(900, 700); public PluginShopDialog(Frame frame, BasicPane pane) { - super(frame, pane, false); + super(frame); + setUndecorated(true); + JPanel panel = (JPanel) getContentPane(); + panel.setLayout(new BorderLayout()); + add(pane, BorderLayout.CENTER); setSize(DEFAULT_SHOP); GUICoreUtils.centerWindow(this); setResizable(false); diff --git a/designer_base/src/com/fr/design/extra/PluginWebBridge.java b/designer_base/src/com/fr/design/extra/PluginWebBridge.java index 947104bf9..07d37b86a 100644 --- a/designer_base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/PluginWebBridge.java @@ -285,6 +285,16 @@ public class PluginWebBridge { } } + /** + * 窗口是否无装饰(判断是否使用系统标题栏) + */ + public boolean isCustomTitleBar() { + if (uiDialog != null) { + return uiDialog.isUndecorated(); + } + return false; + } + /** * 在本地浏览器里打开url * tips:重载的时候,需要给js调用的方法需要放在前面,否则可能不会被调用(此乃坑)