Package java.awt

Examples of java.awt.Frame.dispatchEvent()


        case SWT.Activate:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new WindowEvent (frame, 207 /*WindowEvent.WINDOW_GAINED_FOCUS*/));
              } else {
                if (frame.isActive()) return;
View Full Code Here


            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new WindowEvent (frame, 207 /*WindowEvent.WINDOW_GAINED_FOCUS*/));
              } else {
                if (frame.isActive()) return;
                try {
                  Class clazz = frame.getClass();
View Full Code Here

              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new WindowEvent (frame, 207 /*WindowEvent.WINDOW_GAINED_FOCUS*/));
              } else {
                if (frame.isActive()) return;
                try {
                  Class clazz = frame.getClass();
                  Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
View Full Code Here

          break;
        case SWT.Deactivate:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, 208 /*WindowEvent.WINDOW_LOST_FOCUS*/));
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
              } else {
View Full Code Here

        case SWT.Deactivate:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, 208 /*WindowEvent.WINDOW_LOST_FOCUS*/));
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
              } else {
                if (!frame.isActive()) return;
View Full Code Here

            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, 208 /*WindowEvent.WINDOW_LOST_FOCUS*/));
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
              } else {
                if (!frame.isActive()) return;
                try {
                  Class clazz = frame.getClass();
View Full Code Here

              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, 208 /*WindowEvent.WINDOW_LOST_FOCUS*/));
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
              } else {
                if (!frame.isActive()) return;
                try {
                  Class clazz = frame.getClass();
                  Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
View Full Code Here

    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

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

        case SWT.FocusIn:
        case SWT.Activate:
          EventQueue.invokeLater(new Runnable () {
            public void run () {
              if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 4, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
              } else if (Library.JAVA_VERSION < Library.JAVA_VERSION(1, 5, 0)) {
                frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
                frame.dispatchEvent (new WindowEvent (frame, 207 /*WindowEvent.WINDOW_GAINED_FOCUS*/));
              } else {
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.