public class InternalBoundaryRestriction extends java.lang.Object implements BoundaryRestriction
JDesktopPane
. It makes sure that the top border part of a
window is always visible.InternalScreenDockWindowFactory
FREE, HARD, MEDIUM
Constructor and Description |
---|
InternalBoundaryRestriction(javax.swing.JDesktopPane desktop) |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
check(ScreenDockWindow window)
Calculates the bounds which
window can have. |
java.awt.Rectangle |
check(ScreenDockWindow window,
java.awt.Rectangle target)
Calculates the bounds which
window can have. |
protected java.awt.Rectangle |
validate(java.awt.Rectangle destination,
java.awt.Point center) |
public InternalBoundaryRestriction(javax.swing.JDesktopPane desktop)
public java.awt.Rectangle check(ScreenDockWindow window)
BoundaryRestriction
window
can have.check
in interface BoundaryRestriction
window
- the window whose bounds should be checked.window
, can be null
to indicate that the current boundaries are valid.public java.awt.Rectangle check(ScreenDockWindow window, java.awt.Rectangle target)
BoundaryRestriction
window
can have.check
in interface BoundaryRestriction
window
- the window whose future bounds should be checked.target
- the bounds window
should have, this method
should not write into target
.null
to indicate that
target
is valid.protected java.awt.Rectangle validate(java.awt.Rectangle destination, java.awt.Point center)