bibliothek.gui.dock.common.mode
Class PreviousModeDoubleClickStrategy
java.lang.Object
bibliothek.gui.dock.common.mode.PreviousModeDoubleClickStrategy
- All Implemented Interfaces:
- DoubleClickLocationStrategy
@FrameworkOnly
public class PreviousModeDoubleClickStrategy
- extends Object
- implements DoubleClickLocationStrategy
If the current mode is ExtendedMode.MAXIMIZED
, then this strategy asks
the CLocationModeManager
for the last mode a Dockable
was in and
selects this mode. Otherwise ExtendedMode.MAXIMIZED
is selected.
- Author:
- Benjamin Sigg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreviousModeDoubleClickStrategy
public PreviousModeDoubleClickStrategy(CLocationModeManager manager)
- Creates a new strategy
- Parameters:
manager
- the manager to ask for the previous mode, not null
handleDoubleClick
public ExtendedMode handleDoubleClick(Dockable dockable,
ExtendedMode current,
ExtendedModeEnablement enablement)
- Description copied from interface:
DoubleClickLocationStrategy
- Called if the user double-clicked on
dockable
.
- Specified by:
handleDoubleClick
in interface DoubleClickLocationStrategy
- Parameters:
dockable
- the clicked elementcurrent
- the current mode of dockable
, might be null
enablement
- tells which modes are available for dockable
and which not
- Returns:
- the mode that
dockable
should be assigned, null
indicates
that nothing should happen