bibliothek.gui.dock.station.screen
Interface BoundaryRestriction

All Known Implementing Classes:
HardBoundaryRestriction

public interface BoundaryRestriction

Restricts the boundaries of a ScreenDockDialog, a restriction might be, that the dialog can't be placed outside the screen.

Author:
Benjamin Sigg

Field Summary
static BoundaryRestriction FREE
          A restriction that allows all boundaries.
static BoundaryRestriction HARD
          A restriction that will ensure that every dialog is always visible, even if that means that in a multi screen environment some screens can't be used.
 
Method Summary
 Rectangle check(ScreenDockWindow window)
          Calculates the bounds which window can have.
 Rectangle check(ScreenDockWindow window, Rectangle target)
          Calculates the bounds which window can have.
 

Field Detail

FREE

static final BoundaryRestriction FREE
A restriction that allows all boundaries.


HARD

static final BoundaryRestriction HARD
A restriction that will ensure that every dialog is always visible, even if that means that in a multi screen environment some screens can't be used.

Method Detail

check

Rectangle check(ScreenDockWindow window)
Calculates the bounds which window can have.

Parameters:
window - the window whose bounds should be checked.
Returns:
the new boundaries of window, can be null to indicate that the current boundaries are valid.

check

Rectangle check(ScreenDockWindow window,
                Rectangle target)
Calculates the bounds which window can have.

Parameters:
window - the window whose future bounds should be checked.
target - the bounds window should have, this method should not write into target.
Returns:
the new boundaries, null to indicate that target is valid.