Java Code Examples for java.awt.Window#removeWindowListener()

The following examples show how to use java.awt.Window#removeWindowListener() . 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: WindowChoreographer.java    From rapidminer-studio with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
 * Recalculate the Window position
 *
 * @param window the window
 * @param position the position of the window
 */
private void recalculateWindowPosition(Window window, int position) {
	Rectangle parentBounds = parent.getBounds();
	parentBounds.setLocation(parent.getLocationOnScreen());
	int rightX = (int) (parentBounds.getX() + parent.getWidth() - DEFAULT_RIGHT_MARGIN);
	// this was going crazy sometimes
	int topY = (int) parentBounds.getY();
	int yOffset = windowYOffset.get(position);
	// Recalculate the window positions
	window.setLocation(rightX - window.getWidth(), topY + yOffset - window.getHeight());
	// Check if the Window fits into the parents bounds
	if (!parentBounds.contains(window.getBounds())) {
		// back into the bubbleStack
		window.setVisible(false);
		bubbleStack.addFirst(window);
		freeSpaces.add(windowPosition.remove(window));
		window.removeWindowListener(closeListener);
	}
}
 
Example 2
Source File: ResizablePopup.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void cleanup(Window window) {
    window.setVisible(false);
    if (window instanceof RootPaneContainer) {
        ((RootPaneContainer) window).setContentPane(new JPanel());
    }
    window.removeWindowListener(this);
    window.dispose();
}
 
Example 3
Source File: WindowChoreographer.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void windowClosed(WindowEvent e) {
	Window closedWindow = e.getWindow();
	Integer freePosition = windowPosition.remove(closedWindow);
	closedWindow.removeWindowListener(closeListener);
	// Mark as free
	if (freePosition != null) {
		freeSpaces.add(freePosition);
		cleanUp();
	}
}
 
Example 4
Source File: Win32GraphicsDevice.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 5
Source File: Win32GraphicsDevice.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 6
Source File: Win32GraphicsDevice.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 7
Source File: Win32GraphicsDevice.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 8
Source File: Win32GraphicsDevice.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 9
Source File: Win32GraphicsDevice.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 10
Source File: Win32GraphicsDevice.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 11
Source File: Win32GraphicsDevice.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 12
Source File: Win32GraphicsDevice.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 13
Source File: Win32GraphicsDevice.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 14
Source File: Win32GraphicsDevice.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 15
Source File: Win32GraphicsDevice.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}
 
Example 16
Source File: Win32GraphicsDevice.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the fs window listener.
 *
 * @param w full-screen window
 */
protected void removeFSWindowListener(Window w) {
    w.removeWindowListener(fsWindowListener);
    fsWindowListener = null;
}