public class MediumBoundaryRestriction extends AbstractBoundaryRestriction
FREE, HARD, MEDIUM
Constructor and Description |
---|
MediumBoundaryRestriction() |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
checkSize(ScreenDockWindow window)
Checks the size and location of
window |
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.Rectangle |
findDevice(int x,
int y)
Finds and returns the boundaries of the screen in which
x/y are. |
protected java.awt.Dimension |
getMinimumSize(ScreenDockWindow window)
Gets the minimum size of
window , the default implementation just calls
ScreenDockWindow.getMinimumWindowSize() , but subclasses may override this method
to use another algorithm for finding the minimum window size. |
protected java.awt.Rectangle |
validate(ScreenDockWindow window,
java.awt.Rectangle target,
java.awt.Point center,
java.awt.Point search)
Ensures that
center will be in a visible part of the screen. |
check, check, getMaximumSize
public java.awt.Rectangle checkSize(ScreenDockWindow window)
AbstractBoundaryRestriction
window
checkSize
in class AbstractBoundaryRestriction
window
- the window whose boundaries are checkednull
if the current boundaries of window
are validpublic java.awt.Rectangle checkSize(ScreenDockWindow window, java.awt.Rectangle target)
AbstractBoundaryRestriction
window
assuming that window
will
be give the boundaries target
.checkSize
in class AbstractBoundaryRestriction
window
- the window whose boundaries are checkedtarget
- the boundaries that are requestednull
if target
is validprotected java.awt.Rectangle validate(ScreenDockWindow window, java.awt.Rectangle target, java.awt.Point center, java.awt.Point search)
center
will be in a visible part of the screen.window
- the window whose boundaries are checkedtarget
- the next boundaries for a windowcenter
- the point that should remain visiblesearch
- the point used to find the best matching screen devicetarget
as possibleprotected java.awt.Dimension getMinimumSize(ScreenDockWindow window)
window
, the default implementation just calls
ScreenDockWindow.getMinimumWindowSize()
, but subclasses may override this method
to use another algorithm for finding the minimum window size.window
- the window whose minimum size is requirednull
protected java.awt.Rectangle findDevice(int x, int y)
x/y
are.x
- some x coordinatey
- some y coordinatex/y
or null