Examples of dispatchEvent()


Examples of java.awt.Dialog.dispatchEvent()

    Dialog dialog = SwingUtil.getDialog(this);
    if (dialog != null)
    {
      // Post a 'window closing' event
      dialog.dispatchEvent(new WindowEvent(dialog, WindowEvent.WINDOW_CLOSING));
    }
  }

  //////////////////////////////////////////////////
  // @@ Member access
View Full Code Here

Examples of java.awt.Frame.dispatchEvent()

    public void handleEvent (Event e) {
      switch (e.type) {
        case SWT.Deiconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEICONIFIED));
            }
          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
View Full Code Here

Examples of java.awt.Frame.dispatchEvent()

          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
            }
          });
          break;
      }
    }
View Full Code Here

Examples of java.awt.Frame.dispatchEvent()

    public void handleEvent (Event e) {
      switch (e.type) {
        case SWT.Deiconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEICONIFIED));
            }
          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
View Full Code Here

Examples of java.awt.Frame.dispatchEvent()

          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
            }
          });
          break;
      }
    }
View Full Code Here

Examples of java.awt.Frame.dispatchEvent()

          });
          break;
        case SWT.Iconify:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
            }
          });
          break;
      }
    }
View Full Code Here

Examples of java.awt.Window.dispatchEvent()

        Component focusOwner = (window != null) ? window.getFocusOwner() : null;
        if (focusOwner != null)
        {
          FocusEvent lost = new FocusEvent(focusOwner, FocusEvent.FOCUS_LOST);
          FocusEvent gained = new FocusEvent(focusOwner, FocusEvent.FOCUS_GAINED);
          window.dispatchEvent(lost);
          window.dispatchEvent(gained);
          window.dispatchEvent(lost);
          focusOwner.requestFocus();
        }
      }
View Full Code Here

Examples of java.awt.Window.dispatchEvent()

        if (focusOwner != null)
        {
          FocusEvent lost = new FocusEvent(focusOwner, FocusEvent.FOCUS_LOST);
          FocusEvent gained = new FocusEvent(focusOwner, FocusEvent.FOCUS_GAINED);
          window.dispatchEvent(lost);
          window.dispatchEvent(gained);
          window.dispatchEvent(lost);
          focusOwner.requestFocus();
        }
      }
    });
View Full Code Here

Examples of java.awt.Window.dispatchEvent()

        {
          FocusEvent lost = new FocusEvent(focusOwner, FocusEvent.FOCUS_LOST);
          FocusEvent gained = new FocusEvent(focusOwner, FocusEvent.FOCUS_GAINED);
          window.dispatchEvent(lost);
          window.dispatchEvent(gained);
          window.dispatchEvent(lost);
          focusOwner.requestFocus();
        }
      }
    });
View Full Code Here

Examples of java.awt.im.InputContext.dispatchEvent()

        }
        int id = e.getID();
        boolean isInputEvent = ((id >= KeyEvent.KEY_FIRST) && (id <= KeyEvent.KEY_LAST))
                || ((id >= MouseEvent.MOUSE_FIRST) && (id <= MouseEvent.MOUSE_LAST));
        if (((id >= FocusEvent.FOCUS_FIRST) && (id <= FocusEvent.FOCUS_LAST)) || isInputEvent) {
            ic.dispatchEvent(e);
        }
        return e.isConsumed();
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.