bibliothek.gui.dock.dockable
Class DefaultDockableMovingImageFactory

java.lang.Object
  extended by bibliothek.gui.dock.dockable.DefaultDockableMovingImageFactory
All Implemented Interfaces:
DockableMovingImageFactory

public class DefaultDockableMovingImageFactory
extends Object
implements DockableMovingImageFactory

The default implementation of DockableMovingImageFactory usually behaves exactly like ThemeDockableMovingImageFactory, but also offers an ExtensionName for adding additional factories.

Author:
Benjamin Sigg

Field Summary
static Path FACTORY_EXTENSION
          The name of the ExtensionName that loads additional DockableMovingImageFactorys as extension.
 
Constructor Summary
DefaultDockableMovingImageFactory(DockController controller)
          Creates a new factory using controller to load extensions.
DefaultDockableMovingImageFactory(DockController controller, DockableMovingImageFactory delegate)
          Creates a new factory using controller to load extensions.
 
Method Summary
 MovingImage create(DockController controller, Dockable dockable)
          Gets an image which will be shown underneath the cursor.
 MovingImage create(DockController controller, DockTitle snatched)
          Gets an image which will be shown underneath the cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_EXTENSION

public static final Path FACTORY_EXTENSION
The name of the ExtensionName that loads additional DockableMovingImageFactorys as extension. If any of the create methods is called, the result is the return value of the first extension that does not return null.

Constructor Detail

DefaultDockableMovingImageFactory

public DefaultDockableMovingImageFactory(DockController controller)
Creates a new factory using controller to load extensions.

Parameters:
controller - the controller in whose realm this factory is used

DefaultDockableMovingImageFactory

public DefaultDockableMovingImageFactory(DockController controller,
                                         DockableMovingImageFactory delegate)
Creates a new factory using controller to load extensions.

Parameters:
controller - the controller in whose realm this factory is used
delegate - the backup factory used if no extension is present or no extension has a result
Method Detail

create

public MovingImage create(DockController controller,
                          Dockable dockable)
Description copied from interface: DockableMovingImageFactory
Gets an image which will be shown underneath the cursor. Assumes that the user clicked on dockable.

Specified by:
create in interface DockableMovingImageFactory
Parameters:
controller - The controller which will be responsible for the title
dockable - The Dockable which is snatched
Returns:
the image under the cursor, can be null

create

public MovingImage create(DockController controller,
                          DockTitle snatched)
Description copied from interface: DockableMovingImageFactory
Gets an image which will be shown underneath the cursor. Assumes that the user clicked on the title snatched.

Specified by:
create in interface DockableMovingImageFactory
Parameters:
controller - The controller which will be responsible for the title
snatched - The title which is grabbed by the user
Returns:
the image under the cursor, can be null