javax.swing.plaf.basic
Class BasicDesktopIconUI.MouseInputHandler

java.lang.Object
  extended by javax.swing.event.MouseInputAdapter
      extended by javax.swing.plaf.basic.BasicDesktopIconUI.MouseInputHandler
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
Enclosing class:
BasicDesktopIconUI

public class BasicDesktopIconUI.MouseInputHandler
extends MouseInputAdapter

This helper class handles mouse events that occur on the JDesktopIcon.


Constructor Summary
BasicDesktopIconUI.MouseInputHandler()
           
 
Method Summary
 void mouseDragged(MouseEvent e)
          This method is called when the mouse is dragged in the JDesktopIcon.
 void mouseMoved(MouseEvent e)
          This method is called when the mouse is moved in the JDesktopIcon.
 void mousePressed(MouseEvent e)
          This method is called when the mouse is pressed in the JDesktopIcon.
 void mouseReleased(MouseEvent e)
          This method is called when the mouse is released in the JDesktopIcon.
 void moveAndRepaint(JComponent f, int newX, int newY, int newWidth, int newHeight)
          This method moves and repaints the JDesktopIcon to the given bounds.
 
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDesktopIconUI.MouseInputHandler

public BasicDesktopIconUI.MouseInputHandler()
Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
This method is called when the mouse is dragged in the JDesktopIcon.

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

mouseMoved

public void mouseMoved(MouseEvent e)
This method is called when the mouse is moved in the JDesktopIcon.

Specified by:
mouseMoved in interface MouseMotionListener
Overrides:
mouseMoved in class MouseInputAdapter
Parameters:
e - The MouseEvent.

mousePressed

public void mousePressed(MouseEvent e)
This method is called when the mouse is pressed in the JDesktopIcon.

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

mouseReleased

public void mouseReleased(MouseEvent e)
This method is called when the mouse is released in the JDesktopIcon.

Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class MouseInputAdapter
Parameters:
e - The MouseEvent.

moveAndRepaint

public void moveAndRepaint(JComponent f,
                           int newX,
                           int newY,
                           int newWidth,
                           int newHeight)
This method moves and repaints the JDesktopIcon to the given bounds.

Parameters:
f - The JComponent to move and repaint.
newX - The new x coordinate.
newY - The new y coordinate.
newWidth - The new width.
newHeight - The new height.