Package java.awt.event

Examples of java.awt.event.WindowEvent


        for (Frame frame : JFrame.getFrames()) {
          if (frame.isActive()) {
            status.setText("Zamykanie...");
            Toolkit.getDefaultToolkit().getSystemEventQueue()
                .postEvent(
                    new WindowEvent(frame,
                        WindowEvent.WINDOW_CLOSING));
          }
        }
      }
    });
View Full Code Here


     * Class under test for void processWindowEvent(WindowEvent)
     */
    public void testProcessWindowEvent() {
        TestDialog dialog = new TestDialog();
        dialog.setVisible(true);
        WindowEvent e = new WindowEvent(dialog, WindowEvent.WINDOW_CLOSING);
        // test DO_NOTHING_ON_CLOSE
        dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        dialog.disposeCalled = false;
        dialog.processWindowEvent(e);
        assertFalse("didn't call dispose()", dialog.disposeCalled);
View Full Code Here

      if (frame != null) {
  if (frame instanceof JInternalFrame)
    ((JInternalFrame) frame).doDefaultCloseAction();
  else
    ((Window) frame).dispatchEvent(
        new WindowEvent(
      (Window) frame, WindowEvent.WINDOW_CLOSING));
      }
     
    } else {
      boolean help = ((commandArgs.length > 1)
View Full Code Here

  public void close() {
    if (getParentInternalFrame() != null)
      getParentInternalFrame().doDefaultCloseAction();
    else if (getParentFrame() != null)
      ((Window) getParentFrame()).dispatchEvent(
    new WindowEvent(
        (Window) getParentFrame(), WindowEvent.WINDOW_CLOSING));
  }
View Full Code Here

   
    if( ggTriplet[ 0 ] != null ) {
      ggTriplet[ 0 ].addActionListener( new ActionListener() {
        public void actionPerformed( ActionEvent e )
        {
          w.getWindow().dispatchEvent( new WindowEvent( (Window) w.getWindow(), WindowEvent.WINDOW_CLOSING ));
       
          switch( dco ) {
          case HIDE_ON_CLOSE:
            w.setVisible( false );
            break;
View Full Code Here

        LFrame.attachIcon(this);
    }

    @Override
    public void requestClose() {
        WindowEvent closing = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);
        processWindowEvent(closing);
    }
View Full Code Here

            implements ActionListener, LocaleListener {
        @Override
        public void actionPerformed(ActionEvent event) {
            Object src = event.getSource();
            if (src == close) {
                WindowEvent e = new WindowEvent(PreferencesFrame.this,
                        WindowEvent.WINDOW_CLOSING);
                PreferencesFrame.this.processWindowEvent(e);
            }
        }
View Full Code Here

                        JOptionPane.showMessageDialog(HexFrame.this, e.getMessage(),
                            getFromLocale("hexSaveErrorTitle"), JOptionPane.ERROR_MESSAGE);
                    }
                }
            } else if (src == close) {
                WindowEvent e = new WindowEvent(HexFrame.this,
                        WindowEvent.WINDOW_CLOSING);
                HexFrame.this.processWindowEvent(e);
            }
        }
View Full Code Here

                SimulatorListener, LocaleListener {
        @Override
        public void actionPerformed(ActionEvent event) {
            Object src = event.getSource();
            if (src == close) {
                WindowEvent e = new WindowEvent(LogFrame.this,
                        WindowEvent.WINDOW_CLOSING);
                LogFrame.this.processWindowEvent(e);
            }
        }
View Full Code Here

        public void actionPerformed(ActionEvent event) {
            Object src = event.getSource();
            if (src == revert) {
                getProject().doAction(LogisimFileActions.revertDefaults());
            } else if (src == close) {
                WindowEvent e = new WindowEvent(OptionsFrame.this,
                        WindowEvent.WINDOW_CLOSING);
                OptionsFrame.this.processWindowEvent(e);
            }
        }
View Full Code Here

TOP

Related Classes of java.awt.event.WindowEvent

Copyright © 2018 www.massapicom. 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.