bibliothek.gui.dock.station.screen
Class InternalBoundaryRestriction
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalBoundaryRestriction
public InternalBoundaryRestriction(JDesktopPane desktop)
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)