bibliothek.gui.dock.station.screen
Class DefaultScreenDockFullscreenStrategy

java.lang.Object
  extended by bibliothek.gui.dock.station.screen.DefaultScreenDockFullscreenStrategy
All Implemented Interfaces:
ScreenDockFullscreenStrategy

@Todo(compatibility=COMPATIBLE,
      priority=BUG,
      target=VERSION_1_1_1,
      description="handle taskbar, check multi-screen (does not work properly)")
public class DefaultScreenDockFullscreenStrategy
extends Object
implements ScreenDockFullscreenStrategy

This default implementation of a ScreenDockFullscreenStrategy just works with the boundaries of a ScreenDockWindow. It assumes that either ScreenDockDialog or ScreenDockFrame is used. Subclasses may extend this list, the algorithms of this strategy should work with most implementations that are based on a Window.

Author:
Benjamin Sigg

Constructor Summary
DefaultScreenDockFullscreenStrategy()
           
 
Method Summary
protected  Rectangle findBestFullscreenBounds(Window window)
          Tries to find the boundaries that match the fullscreen-criterium and that match the current location of window.
protected  Rectangle getAvailableBounds(GraphicsConfiguration configuration)
          Gets the boundaries of a GraphicsDevice that can actually be used.
 void install(ScreenDockStation station)
          Informs this strategy that it will be used for station.
 boolean isFullscreen(ScreenDockWindow window)
          Tells whether window is in fullscreen mode.
 boolean isFullscreen(ScreenDockWindow wrapper, Window window)
          Tells whether the frame or dialog window is in fullscreen mode.
 void setFullscreen(ScreenDockWindow window, boolean fullscreen)
          Changes the fullscreen mode of window, does nothing if this strategy cannot handle the type of window.
 void setFullscreen(ScreenDockWindow wrapper, Window window, boolean fullscreen)
          Sets the fullscreen mode of window.
 void uninstall(ScreenDockStation station)
          Informs this strategy that it will no longer be used for station.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultScreenDockFullscreenStrategy

public DefaultScreenDockFullscreenStrategy()
Method Detail

install

public void install(ScreenDockStation station)
Description copied from interface: ScreenDockFullscreenStrategy
Informs this strategy that it will be used for station.

Specified by:
install in interface ScreenDockFullscreenStrategy
Parameters:
station - some station using this strategy

uninstall

public void uninstall(ScreenDockStation station)
Description copied from interface: ScreenDockFullscreenStrategy
Informs this strategy that it will no longer be used for station.

Specified by:
uninstall in interface ScreenDockFullscreenStrategy
Parameters:
station - some station that is no longer using this strategy

isFullscreen

public boolean isFullscreen(ScreenDockWindow window)
Description copied from interface: ScreenDockFullscreenStrategy
Tells whether window is in fullscreen mode. If this strategy cannot handle window it returns false.

Specified by:
isFullscreen in interface ScreenDockFullscreenStrategy
Parameters:
window - some window of a known station
Returns:
true if window is in fullscreen mode, false otherwise

isFullscreen

public boolean isFullscreen(ScreenDockWindow wrapper,
                            Window window)
Tells whether the frame or dialog window is in fullscreen mode.

Parameters:
wrapper - the wrapper around window
window - the window to check
Returns:
the current mode

setFullscreen

public void setFullscreen(ScreenDockWindow window,
                          boolean fullscreen)
Description copied from interface: ScreenDockFullscreenStrategy
Changes the fullscreen mode of window, does nothing if this strategy cannot handle the type of window.

Specified by:
setFullscreen in interface ScreenDockFullscreenStrategy
Parameters:
window - some window of a known station
fullscreen - the new state

setFullscreen

public void setFullscreen(ScreenDockWindow wrapper,
                          Window window,
                          boolean fullscreen)
Sets the fullscreen mode of window.

Parameters:
wrapper - the wrapper around window
window - the window whose state is to be changed
fullscreen - the new state

findBestFullscreenBounds

protected Rectangle findBestFullscreenBounds(Window window)
Tries to find the boundaries that match the fullscreen-criterium and that match the current location of window.

Parameters:
window - some window which is not yet in fullscreen mode
Returns:
boundaries for fullscreen mode or null if not boundaries could be found

getAvailableBounds

protected Rectangle getAvailableBounds(GraphicsConfiguration configuration)
Gets the boundaries of a GraphicsDevice that can actually be used.

Parameters:
configuration - some device
Returns:
the boundaries that can be used