Browse Source

Merge pull request #108 in BA/design from ~VITO/design:dev to dev

* commit '51bdaf47b6150f2155ab611c97b2bac6178f2a1f':
  无窗口设计
master
superman 9 years ago
parent
commit
4b63577ca5
  1. 10
      designer_base/src/com/fr/design/extra/PluginShopDialog.java
  2. 10
      designer_base/src/com/fr/design/extra/PluginWebBridge.java

10
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.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import javafx.embed.swing.JFXPanel;
import javax.swing.*;
import java.awt.*; import java.awt.*;
/** /**
* Created by vito on 16/4/18. * Created by vito on 16/4/18.
*/ */
public class PluginShopDialog extends UIDialog { 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) { 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); setSize(DEFAULT_SHOP);
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
setResizable(false); setResizable(false);

10
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 * 在本地浏览器里打开url
* tips:重载的时候,需要给js调用的方法需要放在前面,否则可能不会被调用(此乃坑) * tips:重载的时候,需要给js调用的方法需要放在前面,否则可能不会被调用(此乃坑)

Loading…
Cancel
Save