Package java.awt.event

Examples of java.awt.event.WindowListener


    public static GuiKeeper keepLocationAndSize(Window wnd){
        if (wnd == null) {
            throw new IllegalArgumentException("wnd == null");
        }
        final Window w = wnd;
        final WindowListener l = new WindowAdapter() {
            @Override
            public void windowOpened(WindowEvent e)
            {
                GuiUtil.centerWindow(w);
                w.removeWindowListener(this);
View Full Code Here


        myHousing.setVisible(true);
        Condition.waitForCondition(5000, new Condition() {
            public boolean getValue() {return myHousing.isVisible();}
        });
        assertTrue(myHousing.isVisible());
        WindowListener listener = myHousing.getWindowListener();
        WindowEvent event = new WindowEvent(myHousing, WindowEvent.WINDOW_CLOSING);
        listener.windowClosing(event);
        myHousing.setVisible(false);
        Condition.waitForCondition(10000, new Condition() {
            public boolean getValue() {return !myHousing.isVisible();}
        });
        assertFalse(myHousing.isVisible());
View Full Code Here

                }
            }
        };
        chat.addMessageListener(l);

        addWindowListener(new WindowListener() {
            @Override
            public void windowOpened(WindowEvent e) {
            }

            @Override
View Full Code Here



        contactsWindow = new ContactsWindow(api);
        contactsWindow.setVisible(true);
        contactsWindow.addWindowListener(new WindowListener() {
            @Override
            public void windowOpened(WindowEvent e) {
            }

            @Override
View Full Code Here

            spinRankedWins.setValue(lolStatus.getRankedWins());
            spinRankedLosses.setValue(lolStatus.getRankedLosses());
            spinRankedRating.setValue(lolStatus.getRankedRating());
            txtTier.setText(lolStatus.getTier());

            addWindowListener(new WindowListener() {
                @Override
                public void windowOpened(WindowEvent e) {
                }

                @Override
View Full Code Here

        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
        this.c = c;

        addWindowListener(new WindowListener() {
            @Override
            public void windowOpened(WindowEvent e) {
            }

            @Override
View Full Code Here

        return mouseListener;
    }

    private WindowListener getNotificationWindowListener() {

        final WindowListener notificationWindowListener = new WindowListener() {

            public void windowOpened(WindowEvent arg0) {
                log.finest("Received window opened");
            }
View Full Code Here

        return settingsListener;
    }

    private WindowListener getSettingsWindowListener() {
        final WindowListener settingsWindowListener = new WindowListener() {
            @Override
            public void windowOpened(WindowEvent arg0) {
                log.finest("Received window opened");
            }
View Full Code Here

     * @param args
     * @throws Exception
     */
    public static void main(String args[]) throws Exception {
        JFrame ownerFrame = new JFrame("JetS3t Uploader");
        ownerFrame.addWindowListener(new WindowListener() {
            public void windowOpened(WindowEvent e) {
            }
            public void windowClosing(WindowEvent e) {
                e.getWindow().dispose();
            }
View Full Code Here

    public static void main(String args[]) throws Exception {
        // When running on OS X, display app menu in the right place (i.e. not the app window)
        System.setProperty("apple.laf.useScreenMenuBar", "true");

        JFrame ownerFrame = new JFrame("JetS3t Cockpit");
        ownerFrame.addWindowListener(new WindowListener() {
            public void windowOpened(WindowEvent e) {
            }
            public void windowClosing(WindowEvent e) {
                e.getWindow().dispose();
            }
View Full Code Here

TOP

Related Classes of java.awt.event.WindowListener

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.