com.alee.managers.drag
Class DragManager

java.lang.Object
  extended by com.alee.managers.drag.DragManager

public class DragManager
extends java.lang.Object

This manager simplifies dragged items visual representation creation. You can add customized representation support for DataFlavor by registering new DragViewHandler. So far custom DataFlavor view will be displayed only within application window bounds.

Author:
Mikle Garin

Field Summary
protected static java.lang.Object data
           
protected static DragViewHandler dragViewHandler
           
protected static java.awt.Component dropLocation
           
protected static WebGlassPane glassPane
          Dragged object representation variables.
protected static boolean initialized
          Whether manager is initialized or not.
protected static java.awt.image.BufferedImage view
           
protected static java.util.Map<java.awt.datatransfer.DataFlavor,DragViewHandler> viewHandlers
          Drag view handlers map.
 
Constructor Summary
DragManager()
           
 
Method Summary
static void initialize()
          Initializes manager if it wasn't already initialized.
static void registerViewHandler(DragViewHandler dragViewHandler)
          Registers new DragViewHandler.
static void unregisterViewHandler(DragViewHandler dragViewHandler)
          Unregisters new DragViewHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewHandlers

protected static java.util.Map<java.awt.datatransfer.DataFlavor,DragViewHandler> viewHandlers
Drag view handlers map.


glassPane

protected static WebGlassPane glassPane
Dragged object representation variables.


data

protected static java.lang.Object data

view

protected static java.awt.image.BufferedImage view

dropLocation

protected static java.awt.Component dropLocation

dragViewHandler

protected static DragViewHandler dragViewHandler

initialized

protected static boolean initialized
Whether manager is initialized or not.

Constructor Detail

DragManager

public DragManager()
Method Detail

initialize

public static void initialize()
Initializes manager if it wasn't already initialized.


registerViewHandler

public static void registerViewHandler(DragViewHandler dragViewHandler)
Registers new DragViewHandler.

Parameters:
dragViewHandler - DragViewHandler to register

unregisterViewHandler

public static void unregisterViewHandler(DragViewHandler dragViewHandler)
Unregisters new DragViewHandler.

Parameters:
dragViewHandler - DragViewHandler to unregister