bibliothek.gui.dock.dockable
Class AncestorMovingImageFactory

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

public class AncestorMovingImageFactory
extends ScreencaptureMovingImageFactory

This factory tries to find a common anchestor of DockTitle and of Dockable and shows a screenshot of this component.

Author:
Benjamin Sigg

Constructor Summary
AncestorMovingImageFactory(Dimension max, float alpha)
          Creates a new factory.
 
Method Summary
 MovingImage create(DockController controller, Dockable dockable)
          Gets an image which will be shown underneath the cursor.
 
Methods inherited from class bibliothek.gui.dock.dockable.ScreencaptureMovingImageFactory
create, createImageFrom, createImageFrom, getAlpha, setAlpha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AncestorMovingImageFactory

public AncestorMovingImageFactory(Dimension max,
                                  float alpha)
Creates a new factory.

Parameters:
max - the maximal size of the images created by this factory, or null for not having a maximum size
alpha - the transparency, where 0 means completely transparent and 1 means completely opaque
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
Overrides:
create in class ScreencaptureMovingImageFactory
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