bibliothek.gui.dock.station.screen
Class InternalBoundaryRestriction

java.lang.Object
  extended by bibliothek.gui.dock.station.screen.InternalBoundaryRestriction
All Implemented Interfaces:
BoundaryRestriction

public class InternalBoundaryRestriction
extends Object
implements BoundaryRestriction

This boundary restriction is based on a JDesktopPane. It makes sure that the top border part of a window is always visible.

Author:
Benjamin Sigg
See Also:
InternalScreenDockWindowFactory

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.screen.BoundaryRestriction
FREE, HARD, MEDIUM
 
Constructor Summary
InternalBoundaryRestriction(JDesktopPane desktop)
           
 
Method Summary
 Rectangle check(ScreenDockWindow window)
          Calculates the bounds which window can have.
 Rectangle check(ScreenDockWindow window, Rectangle target)
          Calculates the bounds which window can have.
protected  Rectangle validate(Rectangle destination, Point center)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalBoundaryRestriction

public InternalBoundaryRestriction(JDesktopPane desktop)
Method Detail

check

public Rectangle check(ScreenDockWindow window)
Description copied from interface: BoundaryRestriction
Calculates the bounds which window can have.

Specified by:
check in interface BoundaryRestriction
Parameters:
window - the window whose bounds should be checked.
Returns:
the new boundaries of window, can be null to indicate that the current boundaries are valid.

check

public Rectangle check(ScreenDockWindow window,
                       Rectangle target)
Description copied from interface: BoundaryRestriction
Calculates the bounds which window can have.

Specified by:
check in interface BoundaryRestriction
Parameters:
window - the window whose future bounds should be checked.
target - the bounds window should have, this method should not write into target.
Returns:
the new boundaries, null to indicate that target is valid.

validate

protected Rectangle validate(Rectangle destination,
                             Point center)