Example usage for java.awt.dnd DragGestureRecognizer setComponent

List of usage examples for java.awt.dnd DragGestureRecognizer setComponent

Introduction

In this page you can find the example usage for java.awt.dnd DragGestureRecognizer setComponent.

Prototype


public synchronized void setComponent(Component c) 

Source Link

Document

set the Component that the DragGestureRecognizer is associated with registerListeners() and unregisterListeners() are called as a side effect as appropriate.

Usage

From source file:org.rdv.ui.DataPanelContainer.java

/**
 * Remove the data panel UI component from this container.
 * /*from  w  ww. ja v a2  s.co  m*/
 * @param component  the UI component to remove.
 * @since            1.1
 */
public void removeDataPanel(JComponent component) {
    DragGestureRecognizer dragGesture = (DragGestureRecognizer) dragGestures.remove(component);
    dragGesture.setComponent(null);

    previousPositions.put(component, new Integer(dataPanels.indexOf(component)));

    dataPanels.remove(component);
    layoutDataPanels();

    log.info("Removed data panel container (total=" + dataPanels.size() + ").");
}