net.sf.freecol.client.gui.panel
Class DragListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by net.sf.freecol.client.gui.panel.DragListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

public final class DragListener
extends java.awt.event.MouseAdapter

A DragListener should be attached to Swing components that have a TransferHandler attached. The DragListener will make sure that the Swing component to which it is attached is draggable (moveable to be precise).


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String LICENSE
           
static java.lang.String REVISION
           
 
Constructor Summary
DragListener(FreeColPanel parentPanel)
          The constructor to use.
 
Method Summary
 void mousePressed(java.awt.event.MouseEvent e)
          Gets called when the mouse was pressed on a Swing component that has this object as a MouseListener.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

LICENSE

public static final java.lang.String LICENSE
See Also:
Constant Field Values

REVISION

public static final java.lang.String REVISION
See Also:
Constant Field Values
Constructor Detail

DragListener

public DragListener(FreeColPanel parentPanel)
The constructor to use.

Parameters:
parentPanel - The layered pane that contains the components to which a DragListener might be attached.
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Gets called when the mouse was pressed on a Swing component that has this object as a MouseListener.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
Parameters:
e - The event that holds the information about the mouse click.