public abstract class AbstractBoundaryRestriction extends java.lang.Object implements BoundaryRestriction
ScreenDockWindow
s.FREE, HARD, MEDIUM
Constructor and Description |
---|
AbstractBoundaryRestriction() |
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 abstract java.awt.Rectangle |
checkSize(ScreenDockWindow window)
Checks the size and location of
window |
protected abstract java.awt.Rectangle |
checkSize(ScreenDockWindow window,
java.awt.Rectangle target)
Checks the size and location of
window assuming that window will
be give the boundaries target . |
protected java.awt.Dimension |
getMaximumSize(ScreenDockWindow window)
Finds the maximum size that
window is allowed to have. |
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 abstract java.awt.Rectangle checkSize(ScreenDockWindow window)
window
window
- the window whose boundaries are checkednull
if the current boundaries of window
are validprotected abstract java.awt.Rectangle checkSize(ScreenDockWindow window, java.awt.Rectangle target)
window
assuming that window
will
be give the boundaries target
.window
- the window whose boundaries are checkedtarget
- the boundaries that are requestednull
if target
is validprotected java.awt.Dimension getMaximumSize(ScreenDockWindow window)
window
is allowed to have.window
- the window whose maximum size is searched