candy.ui
Class WBButtonListener

java.lang.Object
  |
  +--candy.ui.WBButtonListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

class WBButtonListener
extends java.lang.Object
implements java.awt.event.ActionListener

The listener for a WBButton

See Also:
WBButton

Field Summary
(package private)  ClientApp client
          Constructor.
(package private)  WBButton myButton
          The button to which this listener is attached.
(package private)  java.lang.String MyName
          The name of the class which this listener's button represents
(package private) static WBButton theButton
          The currently selected button.
(package private)  WhiteboardDisplay wb
          The associated WhiteboardDisplay
 
Constructor Summary
WBButtonListener(WhiteboardDisplay d, java.lang.String name, ClientApp c)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          The action which occurs when the associated button is clicked.
 java.lang.String getName()
          fetch the name attached to this listener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myButton

WBButton myButton
The button to which this listener is attached.

theButton

static WBButton theButton
The currently selected button.

wb

WhiteboardDisplay wb
The associated WhiteboardDisplay

MyName

java.lang.String MyName
The name of the class which this listener's button represents

client

ClientApp client
Constructor. Builds the class name for the primitive from the specified textual name
Constructor Detail

WBButtonListener

public WBButtonListener(WhiteboardDisplay d,
                        java.lang.String name,
                        ClientApp c)
Constructor.
Parameters:
d - The containing display
name - The textual name
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
The action which occurs when the associated button is clicked.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getName

public java.lang.String getName()
fetch the name attached to this listener