javax.swing.plaf.metal
Class MetalToolBarUI.MetalDockingListener
java.lang.Object
javax.swing.plaf.basic.BasicToolBarUI.DockingListener
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetalToolBarUI.MetalDockingListener
public MetalToolBarUI.MetalDockingListener(JToolBar t)
- Creates a new DockingListener object.
- Parameters:
t - The JToolBar this DockingListener is being used for.
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.