Exemplo n.º 1
0
  protected boolean focusAllowedFor() {
    Window window = getTarget();
    // TODO: check if modal blocked

    boolean allowed =
        (getBlocker() == null) && window.isVisible() && window.isEnabled() && isFocusableWindow();

    focusLog.fine(
        "Checking whether the focus is allowed ["
            + allowed
            + "] for "
            + window.getName()
            + "; blocker: "
            + ((getBlocker() == null) ? "null" : getBlocker().getClass().getName())
            + "; window.isVisible: "
            + window.isVisible()
            + "; window.isEnabled: "
            + window.isEnabled()
            + "; isFocusableWindow: "
            + isFocusableWindow());

    return allowed;
  }
Exemplo n.º 2
0
 private boolean focusAllowedFor() {
   Window window = getTarget();
   // TODO: check if modal blocked
   return window.isVisible() && window.isEnabled() && isFocusableWindow();
 }