Package java.awt

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


        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

        {
          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

    public void actionPerformed(ActionEvent e) {
      Window window = SubstanceTitlePane.this.getWindow();

      if (window != null) {
        window.dispatchEvent(new WindowEvent(window,
            WindowEvent.WINDOW_CLOSING));
      }
    }
  }
View Full Code Here

        {
          currentProject.setStatus( XProject.CLOSING );
          currentProject.setStartupParam( "ExitOnClose", "true" );
          Window window = currentProject.getAppWindow();
          if ( window != null )
            window.dispatchEvent( new WindowEvent( window, WindowEvent.WINDOW_CLOSING ));
         
          window.dispose();
          System.gc();
        }
      });
View Full Code Here

    if(Utils.IS_JAVA_6_OR_GREATER) {
      mouseEvent = new MouseEvent(window, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, 0, false, 0);
    } else {
      mouseEvent = new MouseEvent(window, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, Integer.MIN_VALUE, Integer.MIN_VALUE, 0, false, 0);
    }
    window.dispatchEvent(mouseEvent);
    dialog.addWindowListener(new WindowAdapter() {
      @Override
      public void windowOpened(WindowEvent e) {
        final NativeModalComponent nativeModalComponent = new NativeModalComponent();
        dialog.getContentPane().add(nativeModalComponent.createEmbeddableComponent(new HashMap<Object, Object>()), BorderLayout.CENTER);
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.