Browse Source

Merge pull request #1114 in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit '6142b6ded8bebcce0aa39cdd84b6b617d628e4ad':
  REPORT-21486 设计器 双屏情况,取色器经过双屏连接处会卡死
bugfix/10.0
Hades 5 years ago
parent
commit
593556e614
  1. 15
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

15
designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

@ -167,17 +167,18 @@ class ColorPickerPanel extends JPanel
* 截屏 * 截屏
*/ */
public void captureScreen() { public void captureScreen() {
try try {
{
robot = new Robot(); robot = new Robot();
} }
catch (AWTException e) catch (AWTException e) {
{ FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
// 截屏幕 // 截屏幕
screenImage = robot.createScreenCapture(new Rectangle(0, 0, Toolkit Rectangle rectangle = new Rectangle(0, 0, 0, 0);
.getDefaultToolkit().getScreenSize().width, Toolkit for (GraphicsDevice gd : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
.getDefaultToolkit().getScreenSize().height)); rectangle = rectangle.union(gd.getDefaultConfiguration().getBounds());
}
screenImage = robot.createScreenCapture(rectangle);
} }
/** /**

Loading…
Cancel
Save