Java Code Examples for java.awt.event.WindowEvent#getSource()
The following examples show how to use
java.awt.event.WindowEvent#getSource() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractWindowRunner.java From netbeans with Apache License 2.0 | 6 votes |
@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(); }
Example 2
Source File: Projects.java From Logisim with GNU General Public License v3.0 | 5 votes |
@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(); } }
Example 3
Source File: MultimonFullscreenTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 4
Source File: LuckWindowAdapter.java From littleluck with Apache License 2.0 | 5 votes |
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)); } } }
Example 5
Source File: MultimonFullscreenTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 6
Source File: MultimonFullscreenTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 7
Source File: MultimonFullscreenTest.java From hottub with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 8
Source File: Projects.java From Logisim with GNU General Public License v3.0 | 5 votes |
@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) { } } }
Example 9
Source File: QueryClientGui.java From fosstrak-epcis with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void windowClosing(final WindowEvent e) { if (e.getSource() == debugWindow) { mwShowDebugWindowCheckBox.setSelected(false); return; } }
Example 10
Source File: MultimonFullscreenTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 11
Source File: MultimonFullscreenTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 12
Source File: MultimonFullscreenTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 13
Source File: MultimonFullscreenTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 14
Source File: MultimonFullscreenTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 15
Source File: MultimonFullscreenTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void windowClosing(WindowEvent we) { done = true; Window w = (Window)we.getSource(); if (setNullOnDispose) { w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null); } w.dispose(); }
Example 16
Source File: Projects.java From Logisim with GNU General Public License v3.0 | 4 votes |
@Override public void windowActivated(WindowEvent event) { mostRecentFrame = (Frame) event.getSource(); }
Example 17
Source File: ParmScreen.java From jmg with GNU General Public License v2.0 | 4 votes |
public void windowClosing(WindowEvent e) { if(e.getSource() == this) dispose(); }
Example 18
Source File: LetterNotesEditor.java From jmg with GNU General Public License v2.0 | 4 votes |
public void windowClosing(WindowEvent e) { if(e.getSource() == this) dispose(); }
Example 19
Source File: CpnZoomScreen.java From jmg with GNU General Public License v2.0 | 4 votes |
public void windowClosing(WindowEvent e) { if(e.getSource() == this) dispose(); }
Example 20
Source File: PhraseViewer.java From jmg with GNU General Public License v2.0 | 4 votes |
/** * 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); }