bibliothek.gui.dock.control
Class AcceptanceDockRelocatorMode
java.lang.Object
bibliothek.gui.dock.control.AcceptanceDockRelocatorMode
- All Implemented Interfaces:
- DockAcceptance, DockRelocatorMode
public abstract class AcceptanceDockRelocatorMode
- extends Object
- implements DockRelocatorMode, DockAcceptance
A DockRelocatorMode
that adds itself as a DockAcceptance
to the DockController
when activated.
- Author:
- Benjamin Sigg
Method Summary |
void |
setActive(DockController controller,
boolean active)
Tells this mode whether it should have an influence of the
behaviour or not. |
boolean |
shouldBeActive(DockController controller,
int modifiers)
Tells whether this mode should be activated because of the state of the
controller and the last MouseEvent . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AcceptanceDockRelocatorMode
public AcceptanceDockRelocatorMode(int onmask,
int offmask)
- Creates a new mode. The masks are created by using the
constants "xzy_DOWN_MASK" from
InputEvent
.
- Parameters:
onmask
- the keys that must be pressed to activate this modeoffmask
- the keys that must not be pressed to activate this mode
setActive
public void setActive(DockController controller,
boolean active)
- Description copied from interface:
DockRelocatorMode
- Tells this mode whether it should have an influence of the
behaviour or not.
- Specified by:
setActive
in interface DockRelocatorMode
- Parameters:
controller
- the controller for which this mode is usedactive
- true
if this mode should change
the behaviour, false
otherwise
shouldBeActive
public boolean shouldBeActive(DockController controller,
int modifiers)
- Description copied from interface:
DockRelocatorMode
- Tells whether this mode should be activated because of the state of the
controller and the last
MouseEvent
.
- Specified by:
shouldBeActive
in interface DockRelocatorMode
- Parameters:
controller
- the controller which might be affected by this modemodifiers
- the state of the mouse, see InputEvent.getModifiersEx()
- Returns:
true
if this mode should be activated, false
otherwise