|
|
@ -38,6 +38,7 @@ import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.OperatingSystem; |
|
|
|
import com.fr.stable.OperatingSystem; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Container; |
|
|
|
import javax.swing.AbstractButton; |
|
|
|
import javax.swing.AbstractButton; |
|
|
|
import javax.swing.Action; |
|
|
|
import javax.swing.Action; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
@ -319,7 +320,9 @@ public final class GUICoreUtils { |
|
|
|
// Toolkit.getDefaultToolkit().getScreenSize()在有多个显示器也只能获取到主屏的大小
|
|
|
|
// Toolkit.getDefaultToolkit().getScreenSize()在有多个显示器也只能获取到主屏的大小
|
|
|
|
// getGraphicsConfiguration().getBounds()能获取多个屏时 设计器主体界面所在屏的大小和对应的坐标
|
|
|
|
// getGraphicsConfiguration().getBounds()能获取多个屏时 设计器主体界面所在屏的大小和对应的坐标
|
|
|
|
Rectangle rectangle; |
|
|
|
Rectangle rectangle; |
|
|
|
if (DesignerContext.getDesignerFrame() != null && win.getParent() == null) { |
|
|
|
Container parent = win.getParent(); |
|
|
|
|
|
|
|
boolean displayByDesignerFrame = (DesignerContext.getDesignerFrame() != null && parent == null) || (parent != null && !parent.isVisible()); |
|
|
|
|
|
|
|
if (displayByDesignerFrame) { |
|
|
|
rectangle = DesignerContext.getDesignerFrame().getGraphicsConfiguration().getBounds(); |
|
|
|
rectangle = DesignerContext.getDesignerFrame().getGraphicsConfiguration().getBounds(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
rectangle = win.getGraphicsConfiguration().getBounds(); |
|
|
|
rectangle = win.getGraphicsConfiguration().getBounds(); |
|
|
|