java.awt.event.WindowEvent#getSource()源码实例Demo

下面列出了java.awt.event.WindowEvent#getSource() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: AbstractWindowRunner.java
@Override
public final void windowOpened(WindowEvent e) {
    dlg = (JDialog) e.getSource();
    if (!isDispatchThread) {
        createTask();
    }
    RunOffEDTImpl.CancellableFutureTask f;
    synchronized(this) {
         f = future;
    }
    //Runnable could theoretically complete before we have set the
    //handle, allowing
    //the callee to see a CancellableFutureTask with task == null.
    //So we block launch until the task has been assigned, which is now
    waitForTaskAssignment.countDown();
    grayOutMainWindow();
    f.task.schedule(0);
    startLatch.countDown();
}
 
源代码2 项目: fosstrak-epcis   文件: QueryClientGui.java
@Override
public void windowClosing(final WindowEvent e) {
    if (e.getSource() == debugWindow) {
        mwShowDebugWindowCheckBox.setSelected(false);
        return;
    }
}
 
源代码3 项目: TencentKona-8   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码4 项目: jdk8u60   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码5 项目: openjdk-jdk8u   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码7 项目: openjdk-jdk9   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码8 项目: jdk8u-jdk   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码9 项目: Logisim   文件: Projects.java
@Override
public void windowClosed(WindowEvent event) {
	Frame frame = (Frame) event.getSource();
	Project proj = frame.getProject();

	if (frame == proj.getFrame()) {
		projectRemoved(proj, frame, this);
	}
	if (openProjects.isEmpty() && !MacCompatibility.isSwingUsingScreenMenuBar()) {
		ProjectActions.doQuit();
	}
}
 
源代码10 项目: Logisim   文件: Projects.java
@Override
public void windowClosing(WindowEvent event) {
	Frame frame = (Frame) event.getSource();
	if ((frame.getExtendedState() & java.awt.Frame.ICONIFIED) == 0) {
		mostRecentFrame = frame;
		try {
			frameLocations.put(frame, frame.getLocationOnScreen());
		} catch (Throwable t) {
		}
	}
}
 
源代码11 项目: hottub   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码12 项目: openjdk-8-source   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码13 项目: jdk8u_jdk   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码14 项目: littleluck   文件: LuckWindowAdapter.java
public void windowStateChanged(WindowEvent e)
{
    Window window = (Window) e.getSource();

    if (window instanceof JFrame)
    {
        JFrame frame = (JFrame) window;

        JRootPane rootPane = frame.getRootPane();

        if(rootPane.getUI() instanceof LuckRootPaneUI)
        {
            LuckRootPaneUI rootPaneUI = (LuckRootPaneUI) rootPane.getUI();

            rootPaneUI.getTitlePane().setState(e.getNewState());
        }

        if (e.getNewState() == JFrame.MAXIMIZED_BOTH)
        {
        	rootPane.setBorder(null);
        }
        else if (e.getNewState() == JFrame.NORMAL)
        {
        	rootPane.setBorder(UIManager.getBorder(LuckRootPaneUIBundle.FRAME_BORDER));
        }
    }
}
 
源代码15 项目: jdk8u-jdk   文件: MultimonFullscreenTest.java
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
源代码16 项目: jmg   文件: LetterNotesEditor.java
public void windowClosing(WindowEvent e) {
    if(e.getSource() == this) dispose();
}
 
源代码17 项目: Logisim   文件: Projects.java
@Override
public void windowActivated(WindowEvent event) {
	mostRecentFrame = (Frame) event.getSource();
}
 
源代码18 项目: jmg   文件: ParmScreen.java
public void windowClosing(WindowEvent e) {
    if(e.getSource() == this) dispose();
}
 
源代码19 项目: jmg   文件: CpnZoomScreen.java
public void windowClosing(WindowEvent e) {
    if(e.getSource() == this) dispose();
}
 
源代码20 项目: jmg   文件: PhraseViewer.java
/**
 * Invoked when a window is in the process of being closed.
 * The close operation can be overridden at this point.
 */
public void windowClosing(WindowEvent e) {
    if(e.getSource() == this) dispose();
    //System.exit(0);
}