edu.princeton.swing
Class PHyperlink.Listener

java.lang.Object
  extended by edu.princeton.swing.PHyperlink.Listener
All Implemented Interfaces:
MouseListener, EventListener, ChangeListener
Enclosing class:
PHyperlink

protected class PHyperlink.Listener
extends Object
implements ChangeListener, MouseListener

Listener implements ChangeListener to listen for changes in the ButtonModel's state and MouseListener to listen for mouse actions on the label.


Constructor Summary
protected PHyperlink.Listener()
          Creates a new Listener object.
 
Method Summary
 void mouseClicked(MouseEvent e)
          Implement MouseListener to update the model's state based on mouse events.
 void mouseEntered(MouseEvent e)
          Implement MouseListener to update the model's state based on mouse events.
 void mouseExited(MouseEvent e)
          Implement MouseListener to update the model's state based on mouse events.
 void mousePressed(MouseEvent e)
          Implement MouseListener to update the model's state based on mouse events.
 void mouseReleased(MouseEvent e)
          Implement MouseListener to update the model's state based on mouse events.
 void stateChanged(ChangeEvent e)
          Implements ChangeListener to listen for changes in the ButtonModel's state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PHyperlink.Listener

protected PHyperlink.Listener()
Creates a new Listener object.

Method Detail

stateChanged

public void stateChanged(ChangeEvent e)
Implements ChangeListener to listen for changes in the ButtonModel's state.

Specified by:
stateChanged in interface ChangeListener

mouseClicked

public void mouseClicked(MouseEvent e)
Implement MouseListener to update the model's state based on mouse events.

Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Implement MouseListener to update the model's state based on mouse events.

Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Implement MouseListener to update the model's state based on mouse events.

Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Implement MouseListener to update the model's state based on mouse events.

Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Implement MouseListener to update the model's state based on mouse events.

Specified by:
mouseExited in interface MouseListener