public final boolean isAlphaModeEnabled(final Window window) {
   if (!window.isDisplayable() || !window.isShowing()) {
     throw new IllegalArgumentException(
         "window must be displayable and showing. window=" + window);
   }
   return isAlphaModeSupported();
 }
Exemple #2
0
  // recenter the mouse using the robot
  public synchronized void recenterMouse() {
    Window w = s.getFullScreenWindow();

    if (robot != null && w.isShowing()) {
      center.x = w.getWidth() / 2;
      center.y = w.getHeight() / 2;

      SwingUtilities.convertPointToScreen(center, w);
      centering = true;
      robot.mouseMove(center.x, center.y);
    }
  }
  public final void setAlphaModeRatio(final Window window, final float ratio) {
    if (!window.isDisplayable() || !window.isShowing()) {
      throw new IllegalArgumentException(
          "window must be displayable and showing. window=" + window);
    }
    if (ratio < 0.0f || ratio > 1.0f) {
      throw new IllegalArgumentException("ratio must be in [0..1] range. ratio=" + ratio);
    }
    if (!isAlphaModeSupported() || !isAlphaModeEnabled(window)) {
      return;
    }

    setAlphaMode(window, ratio);
  }
 public final void setAlphaModeEnabled(final Window window, final boolean state) {
   if (!window.isDisplayable() || !window.isShowing()) {
     throw new IllegalArgumentException(
         "window must be displayable and showing. window=" + window);
   }
 }