javax.swing.plaf.metal

Class MetalToolBarUI.MetalDockingListener

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.
Constructor Summary
MetalDockingListener(JToolBar t)
Creates a new DockingListener object.
Method Summary
voidmouseDragged(MouseEvent e)
This method is called when the mouse is dragged.
voidmousePressed(MouseEvent e)
This method is called when the mouse is pressed in the JToolBar.

Constructor Detail

MetalDockingListener

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

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

Method Detail

mouseDragged

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

Parameters: e The MouseEvent.

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.

Parameters: e The MouseEvent.