Browse Source

Merge pull request #2696 in DESIGN/design from final/10.0 to release/10.0

* commit 'cdfbf7c0b636cc357a8f140c829a905682e2dbd9':
  REPORT-39952 【产品验收】【JDK11设计器】150%时 插件管理显示过大
feature/big-screen
superman 4 years ago
parent
commit
8370ce0d5c
  1. 14
      designer-base/src/main/java/com/fr/design/extra/ShopDialog.java

14
designer-base/src/main/java/com/fr/design/extra/ShopDialog.java

@ -2,6 +2,7 @@ package com.fr.design.extra;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.jdk.JdkVersion;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -12,7 +13,6 @@ import java.awt.*;
* Created by vito on 16/4/18. * Created by vito on 16/4/18.
*/ */
public class ShopDialog extends UIDialog { public class ShopDialog extends UIDialog {
private static final Dimension DEFAULT_SHOP = new Dimension(900, 700);
public ShopDialog(Frame frame, BasicPane pane) { public ShopDialog(Frame frame, BasicPane pane) {
super(frame); super(frame);
@ -22,11 +22,21 @@ public class ShopDialog extends UIDialog {
JPanel panel = (JPanel) getContentPane(); JPanel panel = (JPanel) getContentPane();
panel.setLayout(new BorderLayout()); panel.setLayout(new BorderLayout());
add(pane, BorderLayout.CENTER); add(pane, BorderLayout.CENTER);
setSize(DEFAULT_SHOP); setSize(createDefaultDimension());
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
setResizable(false); setResizable(false);
} }
private Dimension createDefaultDimension() {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
// jdk11 分辨率较低 缩放较大时 屏幕高度小于或接近设定的高度 需要调整下
if (JdkVersion.GE_9.support() && screenSize.height - 700 < 50) {
return new Dimension(900, screenSize.height - 100);
} else {
return new Dimension(900, 700);
}
}
@Override @Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
// do nothing // do nothing

Loading…
Cancel
Save