public class HardBoundaryRestriction extends AbstractBoundaryRestriction
FREE, HARD, MEDIUM
Constructor and Description |
---|
HardBoundaryRestriction() |
Modifier and Type | Method and Description |
---|---|
protected Rectangle |
boundsInDevice(ScreenDockWindow window,
int x,
int y,
int width,
int height,
GraphicsDevice device)
Calculates size and location of
dialog such that it is
in device . |
protected Rectangle |
checkSize(ScreenDockWindow window)
Checks the size and location of
window |
protected Rectangle |
checkSize(ScreenDockWindow window,
Rectangle target)
Checks the size and location of
window assuming that window will
be give the boundaries target . |
protected double |
measureBounds(ScreenDockWindow window,
int x,
int y,
int width,
int height,
GraphicsDevice device)
Checks how good
window fits into the screen device |
check, check, getMaximumSize
protected Rectangle checkSize(ScreenDockWindow window)
AbstractBoundaryRestriction
window
checkSize
in class AbstractBoundaryRestriction
window
- the window whose boundaries are checkednull
if the current boundaries of window
are validprotected Rectangle checkSize(ScreenDockWindow window, 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 double measureBounds(ScreenDockWindow window, int x, int y, int width, int height, GraphicsDevice device)
window
fits into the screen device
window
- the window that is checkedx
- the desired x-coordinatey
- the desired y-coordinatewidth
- the desired widthheight
- the desired heightdevice
- the targeted screenprotected Rectangle boundsInDevice(ScreenDockWindow window, int x, int y, int width, int height, GraphicsDevice device)
dialog
such that it is
in device
.window
- the window to checkx
- the desired x-coordinatey
- the desired y-coordinatewidth
- the desired widthheight
- the desired heightdevice
- the screen in which to show this dialognull