コード例 #1
0
 private void drawScreenFrame(Graphics2D g2d, int scrId) {
   g2d.setColor(screenFrameColor);
   g2d.setStroke(strokeScreenFrame);
   if (screenFrame == null) {
     screenFrame = Screen.getBounds(scrId);
     Rectangle ubound = scrOCP.getBounds();
     screenFrame.x -= ubound.x;
     screenFrame.y -= ubound.y;
     int sw = (int) (strokeScreenFrame.getLineWidth() / 2);
     screenFrame.x += sw;
     screenFrame.y += sw;
     screenFrame.width -= sw * 2;
     screenFrame.height -= sw * 2;
   }
   g2d.draw(screenFrame);
 }
コード例 #2
0
 public void prompt(String msg) {
   captureScreen(scrOCP);
   Rectangle rect = new Rectangle(scrOCP.getBounds());
   this.setBounds(rect);
   promptMsg = msg;
   Debug.log(
       4,
       "CapturePrompt: [%d,%d (%d, %d)] %s",
       rect.x,
       rect.y,
       rect.width,
       rect.height,
       promptMsg);
   this.setVisible(true);
   if (!Settings.isJava7()) {
     if (Settings.isMac()) {
       SysUtil.getOSUtil().bringWindowToFront(this, false);
     }
   }
   this.requestFocus();
 }