/** * Removes a {@link FullScreenListener} from the specified top-level {@link Window}. * * @param window to remove the {@link FullScreenListener} from * @param listener to be removed * @throws IllegalArgumentException if window is not a {@link RootPaneContainer} */ public static void removeFullScreenListenerFrom( final Window window, final FullScreenListener listener) { if (!(window instanceof RootPaneContainer)) throw new IllegalArgumentException( "Can't remove FullScreenListener from non-RootPaneContainer"); if (listener == null) throw new NullPointerException(); FullScreenHandler.removeFullScreenListenerFrom((RootPaneContainer) window, listener); }
/** * Attaches a {@link FullScreenListener} to the specified top-level {@link Window}. * * @param window to attach the {@link FullScreenListener} to * @param listener to be notified when a full screen event occurs * @throws IllegalArgumentException if window is not a {@link RootPaneContainer} */ public static void addFullScreenListenerTo( final Window window, final FullScreenListener listener) { if (!(window instanceof RootPaneContainer)) throw new IllegalArgumentException( "Can't attach FullScreenListener to a non-RootPaneContainer"); if (listener == null) throw new NullPointerException(); FullScreenHandler.addFullScreenListenerTo((RootPaneContainer) window, listener); }