bibliothek.gui.dock.station.screen
Class MediumBoundaryRestriction
java.lang.Object
bibliothek.gui.dock.station.screen.AbstractBoundaryRestriction
bibliothek.gui.dock.station.screen.MediumBoundaryRestriction
- All Implemented Interfaces:
- BoundaryRestriction
public class MediumBoundaryRestriction
- extends AbstractBoundaryRestriction
A restriction that ensures that the title of each dialog is always visible.
- Author:
- Benjamin Sigg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediumBoundaryRestriction
public MediumBoundaryRestriction()
checkSize
public Rectangle checkSize(ScreenDockWindow window)
- Description copied from class:
AbstractBoundaryRestriction
- Checks the size and location of
window
- Specified by:
checkSize in class AbstractBoundaryRestriction
- Parameters:
window - the window whose boundaries are checked
- Returns:
- the new boundaries or
null if the current boundaries of window are valid
checkSize
public Rectangle checkSize(ScreenDockWindow window,
Rectangle target)
- Description copied from class:
AbstractBoundaryRestriction
- Checks the size and location of
window assuming that window will
be give the boundaries target.
- Specified by:
checkSize in class AbstractBoundaryRestriction
- Parameters:
window - the window whose boundaries are checkedtarget - the boundaries that are requested
- Returns:
- the boundaries to use or
null if target is valid
validate
protected Rectangle validate(ScreenDockWindow window,
Rectangle target,
Point center,
Point search)
- Ensures that
center will be in a visible part of the screen.
- Parameters:
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 device
- Returns:
- a set of boundaries that is as close to
target as possible
findDevice
protected Rectangle findDevice(int x,
int y)
- Finds and returns the boundaries of the screen in which
x/y are.
- Parameters:
x - some x coordinatey - some y coordinate
- Returns:
- the boundaries of the nearest screen containing
x/y or null