All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.gluebooster.java.booster.basic.gui.awt.WindowBoostUtils Maven / Gradle / Ivy

package net.sf.gluebooster.java.booster.basic.gui.awt;

import java.awt.Window;
import java.awt.event.WindowEvent;

/**
 * Utilities to manipulate windows.
 * 
 * @author CBauer
 * @defaultParamText window The involved window
 * 
 */
public class WindowBoostUtils {

	/**
	 * Create a closing event.
	 * 
	 * @return the created event.
	 */
	public static WindowEvent createClosingEvent(Window window) {
		WindowEvent result = new WindowEvent(window, WindowEvent.WINDOW_CLOSING);
		return result;
	}

	/**
	 * Dispatch a closing event to the window.
	 */
	public static void dispatchClosingEvent(Window window) {
		window.dispatchEvent(createClosingEvent(window));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy