bibliothek.gui.dock.common.mode
Class PreviousModeDoubleClickStrategy

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.facile.mode.DoubleClickLocationStrategy
DEFAULT
 
Constructor Summary
PreviousModeDoubleClickStrategy(CLocationModeManager manager)
          Creates a new strategy
 
Method Summary
 ExtendedMode handleDoubleClick(Dockable dockable, ExtendedMode current, ExtendedModeEnablement enablement)
          Called if the user double-clicked on dockable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviousModeDoubleClickStrategy

public PreviousModeDoubleClickStrategy(CLocationModeManager manager)
Creates a new strategy

Parameters:
manager - the manager to ask for the previous mode, not null
Method Detail

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 element
current - 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