Browse Source

REPORT-21486 设计器 双屏情况,取色器经过双屏连接处会卡死

bugfix/10.0
hades 5 years ago
parent
commit
8141138aae
  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() {
try
{
try {
robot = new Robot();
}
catch (AWTException e)
{
catch (AWTException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
// 截屏幕
screenImage = robot.createScreenCapture(new Rectangle(0, 0, Toolkit
.getDefaultToolkit().getScreenSize().width, Toolkit
.getDefaultToolkit().getScreenSize().height));
Rectangle rectangle = new Rectangle(0, 0, 0, 0);
for (GraphicsDevice gd : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
rectangle = rectangle.union(gd.getDefaultConfiguration().getBounds());
}
screenImage = robot.createScreenCapture(rectangle);
}
/**

Loading…
Cancel
Save