org.grinvin.gui.dnd

Class SelectionDragHandler

Implemented Interfaces:
DragHandler

public class SelectionDragHandler
extends AbstractDragHandler

Simple drag handler that allows dragging from any standard component which satisfies the HasSelectableValues interface and exports objects of a single type.

Exports the current selection but does not remove it.

Constructor Summary

SelectionDragHandler(Class type)
Create a simple drag handler for objects of the given type.
SelectionDragHandler(Class type, int sourceActions)

Method Summary

void
exportDone(JComponent source, JComponent target, Object[] objects, Class type, int action)

Methods inherited from class org.grinvin.gui.dnd.AbstractDragHandler

exportDone, getExportedClass, getExportedObjects, getSourceActions

Constructor Details

SelectionDragHandler

public SelectionDragHandler(Class type)
Create a simple drag handler for objects of the given type.

SelectionDragHandler

public SelectionDragHandler(Class type,
                            int sourceActions)

Method Details

exportDone

public void exportDone(JComponent source,
                       JComponent target,
                       Object[] objects,
                       Class type,
                       int action)
Overrides:
exportDone in interface AbstractDragHandler