swingx
Version 2005-08-19

org.jdesktop.swingx
Class RolloverProducer

java.lang.Object
  extended by org.jdesktop.swingx.RolloverProducer
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

public class RolloverProducer
extends Object
implements MouseListener, MouseMotionListener

Mouse/Motion/Listener which stores mouse location as client property in the target JComponent. Note: assumes that the component it is listening to is of type JComponent!


Field Summary
static String CLICKED_KEY
           
protected  Point rollover
           
static String ROLLOVER_KEY
           
 
Constructor Summary
RolloverProducer()
           
 
Method Summary
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
protected  void updateClientProperty(JComponent component, String property)
           
protected  void updateRollover(MouseEvent e, String property)
           
protected  void updateRolloverPoint(JComponent component, Point mousePoint)
          Subclasses must override to map the given mouse coordinates into appropriate client coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLICKED_KEY

public static final String CLICKED_KEY
See Also:
Constant Field Values

ROLLOVER_KEY

public static final String ROLLOVER_KEY
See Also:
Constant Field Values

rollover

protected Point rollover
Constructor Detail

RolloverProducer

public RolloverProducer()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

updateRollover

protected void updateRollover(MouseEvent e,
                              String property)

updateClientProperty

protected void updateClientProperty(JComponent component,
                                    String property)

updateRolloverPoint

protected void updateRolloverPoint(JComponent component,
                                   Point mousePoint)
Subclasses must override to map the given mouse coordinates into appropriate client coordinates. The result must be stored in the rollover field. Here: does nothing.

Parameters:
component -
mousePoint -

swingx
Version 2005-08-19