org.jgraph.plaf.basic

Class BasicGraphDropTargetListener

Implemented Interfaces:
ActionListener, DropTargetListener, UIResource
Known Direct Subclasses:
BasicGraphUI.GraphDropTargetListener

public class BasicGraphDropTargetListener
extends java.lang.Object
implements DropTargetListener, UIResource, ActionListener

Constructor Summary

BasicGraphDropTargetListener()
construct a DropTargetAutoScroller

Method Summary

void
actionPerformed(ActionEvent e)
The timer fired, perform autoscroll if the pointer is within the autoscroll region.
void
dragEnter(DropTargetDragEvent e)
void
dragExit(DropTargetEvent e)
void
dragOver(DropTargetDragEvent e)
void
drop(DropTargetDropEvent e)
void
dropActionChanged(DropTargetDragEvent e)
protected void
restoreComponentState(JComponent c)
called to restore the state of a component in case a drop is not performed.
protected void
restoreComponentStateForDrop(JComponent c)
called to restore the state of a component in case a drop is performed.
protected void
saveComponentState(JComponent c)
called to save the state of a component in case it needs to be restored because a drop is not performed.
protected void
updateInsertionLocation(JComponent c, Point p)
called to set the insertion location to match the current mouse pointer coordinates.

Constructor Details

BasicGraphDropTargetListener

public BasicGraphDropTargetListener()
construct a DropTargetAutoScroller

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)
The timer fired, perform autoscroll if the pointer is within the autoscroll region.

Parameters:
e - the ActionEvent

dragEnter

public void dragEnter(DropTargetDragEvent e)

dragExit

public void dragExit(DropTargetEvent e)

dragOver

public void dragOver(DropTargetDragEvent e)

drop

public void drop(DropTargetDropEvent e)

dropActionChanged

public void dropActionChanged(DropTargetDragEvent e)

restoreComponentState

protected void restoreComponentState(JComponent c)
called to restore the state of a component in case a drop is not performed.

restoreComponentStateForDrop

protected void restoreComponentStateForDrop(JComponent c)
called to restore the state of a component in case a drop is performed.

saveComponentState

protected void saveComponentState(JComponent c)
called to save the state of a component in case it needs to be restored because a drop is not performed.

updateInsertionLocation

protected void updateInsertionLocation(JComponent c,
                                       Point p)
called to set the insertion location to match the current mouse pointer coordinates.

Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.