com.javadocking.drag.painter
Class OldWindowDockableDragPainter

java.lang.Object
  extended by com.javadocking.drag.painter.OldWindowDockableDragPainter
All Implemented Interfaces:
DockableDragPainter

public class OldWindowDockableDragPainter
extends java.lang.Object
implements DockableDragPainter

A dockable drag painter that only paints the dockable when the new dock is a FloatDock. The dockable is painted on a window. The given RectanglePainter paints the dockable on this window.

Author:
Heidi Rakels.

Constructor Summary
OldWindowDockableDragPainter(DragComponentFactory dragComponentFactory)
          Constructs a Swing dockable drag painter that uses the given drag component factory.
OldWindowDockableDragPainter(RectanglePainter rectanglePainter)
          Constructs a Swing dockable drag painter that uses a RectangleDragComponentFactory as drag component factory.
 
Method Summary
 void clear()
          Clears everything what was painted by this painter before.
 void paintDockableDrag(Dockable dockable, Dock dock, java.awt.Rectangle rectangle, java.awt.Point locationInDestinationDock)
           Paints a dockable during dragging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldWindowDockableDragPainter

public OldWindowDockableDragPainter(DragComponentFactory dragComponentFactory)
Constructs a Swing dockable drag painter that uses the given drag component factory.

Parameters:
dragComponentFactory - The factory that creates the component that represents the dragged dockable.

OldWindowDockableDragPainter

public OldWindowDockableDragPainter(RectanglePainter rectanglePainter)
Constructs a Swing dockable drag painter that uses a RectangleDragComponentFactory as drag component factory.

Parameters:
rectanglePainter - The rectangle painter used by the default drag component factory to paint the dragged dockable on the component.
Method Detail

clear

public void clear()
Description copied from interface: DockableDragPainter
Clears everything what was painted by this painter before.

Specified by:
clear in interface DockableDragPainter

paintDockableDrag

public void paintDockableDrag(Dockable dockable,
                              Dock dock,
                              java.awt.Rectangle rectangle,
                              java.awt.Point locationInDestinationDock)
Description copied from interface: DockableDragPainter

Paints a dockable during dragging.

Usually a rectangle is painted. It shows where the dockable will be docked in the dock, if the mouse would be released at the current mouse position.

Specified by:
paintDockableDrag in interface DockableDragPainter
Parameters:
dockable - The dockable that will be painted.
dock - The dock in which the dockable can be docked.
rectangle - The rectangle that defines, where the given dockable will be docked, if the mouse is released at the current mouse position. The position of the rectangle is relative to the given dock.
locationInDestinationDock - The position of the mouse relative to the given dock.