org.browsecode.helpers.customizabletoolbar
Class ReorderableDragHandler

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by org.browsecode.helpers.customizabletoolbar.ReorderableDragHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class ReorderableDragHandler
extends java.awt.event.MouseAdapter
implements java.awt.event.MouseMotionListener


Constructor Summary
ReorderableDragHandler(javax.swing.JComponent dragContainer)
           
ReorderableDragHandler(javax.swing.JComponent dragContainer, boolean dragHorizontally)
           
 
Method Summary
 void doMouseEvent(java.awt.event.MouseEvent e)
           
 void doMouseEventX(java.awt.event.MouseEvent e)
           
 void doMouseEventY(java.awt.event.MouseEvent e)
           
 void doneHandling()
           
 void handle(java.awt.Component componentToDrag, java.awt.Component showAsDrag, int currentButtonPosition)
           
 void handle(java.awt.Component componentToDrag, int currentButtonPosition)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReorderableDragHandler

public ReorderableDragHandler(javax.swing.JComponent dragContainer)

ReorderableDragHandler

public ReorderableDragHandler(javax.swing.JComponent dragContainer,
                              boolean dragHorizontally)
Parameters:
dragContainer -
dragHorizontally - If true, the dragging is assumed to be primarily horizontal (by default, true). If false, dragging is assumed to be primarily vertical.
Method Detail

handle

public void handle(java.awt.Component componentToDrag,
                   int currentButtonPosition)

handle

public void handle(java.awt.Component componentToDrag,
                   java.awt.Component showAsDrag,
                   int currentButtonPosition)

doneHandling

public void doneHandling()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter

doMouseEvent

public void doMouseEvent(java.awt.event.MouseEvent e)

doMouseEventX

public void doMouseEventX(java.awt.event.MouseEvent e)

doMouseEventY

public void doMouseEventY(java.awt.event.MouseEvent e)