edu.cmu.hcii.calo.view.training.TrainingMenuListener Class Reference

Collaboration diagram for edu.cmu.hcii.calo.view.training.TrainingMenuListener:

Collaboration graph
[legend]
List of all members.

Detailed Description

A simple mouse listener that can be attached to a component to show a customized CALO Training menu whenever it is right-clicked.

Author:
Brian Ellis


Public Member Functions

abstract JMenuItem[] getItems ()
 Should be implemented by instances to return the menu items that will be prepended to the menu when it is displayed.
TrainingMenu getMenu ()
 Returns the menu that will be shown on right-click, creating it if necessary.
void mouseClicked (MouseEvent e)
 Invoked when the mouse is clicked in the attached control.

Private Attributes

TrainingMenu menu = null
 The menu itself.


Member Function Documentation

abstract JMenuItem [] edu.cmu.hcii.calo.view.training.TrainingMenuListener.getItems (  )  [pure virtual]

Should be implemented by instances to return the menu items that will be prepended to the menu when it is displayed.

Returns:
the menu items to prepend

TrainingMenu edu.cmu.hcii.calo.view.training.TrainingMenuListener.getMenu (  ) 

Returns the menu that will be shown on right-click, creating it if necessary.

getItems() will be called to populate the menu the first time this method is called.

Returns:
the menu

void edu.cmu.hcii.calo.view.training.TrainingMenuListener.mouseClicked ( MouseEvent  e  ) 

Invoked when the mouse is clicked in the attached control.

Shows the menu if the event was fired as the result of a right-click.

Parameters:
e the mouse event


Member Data Documentation

TrainingMenu edu.cmu.hcii.calo.view.training.TrainingMenuListener.menu = null [private]

The menu itself.

Lazily constructed.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:29 2007 for CALO by  doxygen 1.5.2