javax.swing.plaf.metal
Class MetalToolBarUI.MetalDockingListener

java.lang.Object
  extended by javax.swing.plaf.basic.BasicToolBarUI.DockingListener
      extended by javax.swing.plaf.metal.MetalToolBarUI.MetalDockingListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
Enclosing class:
MetalToolBarUI

protected class MetalToolBarUI.MetalDockingListener
extends BasicToolBarUI.DockingListener

This is the MouseHandler class that allows the user to drag the JToolBar in and out of the parent and dock it if it can.


Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
isDragging, origin, toolBar
 
Constructor Summary
MetalToolBarUI.MetalDockingListener(JToolBar t)
          Creates a new DockingListener object.
 
Method Summary
 void mouseDragged(MouseEvent e)
          This method is called when the mouse is dragged.
 void mousePressed(MouseEvent e)
          This method is called when the mouse is pressed in the JToolBar.
 
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI.DockingListener
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalToolBarUI.MetalDockingListener

public MetalToolBarUI.MetalDockingListener(JToolBar t)
Creates a new DockingListener object.

Parameters:
t - The JToolBar this DockingListener is being used for.
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
This method is called when the mouse is pressed in the JToolBar. If the press doesn't occur in a place where it causes the JToolBar to be dragged, it returns. Otherwise, it starts a drag session.

Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class BasicToolBarUI.DockingListener
Parameters:
e - The MouseEvent.

mouseDragged

public void mouseDragged(MouseEvent e)
This method is called when the mouse is dragged. It delegates the drag painting to the dragTo method.

Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class BasicToolBarUI.DockingListener
Parameters:
e - The MouseEvent.