code::ActionEvent Class Reference

Inheritance diagram for code::ActionEvent:

code::AlgorithmControl::ControlEvent code::FileChangeNotifier::NotifierEvent code::Index::EndDatasetEvent code::Index::NewRecordEvent code::Index::NewTimeStampEvent code::LBActionSource::LBEvent code::TimedEventHandler::TimerEvent List of all members.

Detailed Description

A semantic event which indicates that an object-defined action occured.

This high-level event is generated by an ActionSource (such as a Button) when the object-specific action occurs (such as being pressed). The event is passed to every every ActionListener object that registered to receive such events using the ActionSource's addActionListener method.

The object that implements the ActionListener interface gets this ActionEvent when the event occurs. The listener is therefore spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "button pressed".

Like Dialog/DialogListener and ListModel/ListListener, this is another instance of the "Observer/Observable" pattern, discussed in "Design Patterns: Elements of Reusable Object-Oriented Software" (Gamma, Helm, Johnson, Vlissides, 1995).

Author:
Charles Kerr
Version:
:
Id
code_ActionEvent.h,v 1.14 2009/12/10 20:08:39 lakshman Exp
See also:
ActionSource

ActionListener


Public Member Functions

ActionSourcegetSource () const
 Returns a pointer to the object that generated this ActionEvent.
const std::string & getType () const
 Returns a source-specific type identifier to indicate what action occurred.
 ActionEvent (ActionSource *s, const std::string &t)
virtual ~ActionEvent ()
 All classes should have virtual destructors.


Constructor & Destructor Documentation

code::ActionEvent::ActionEvent ( ActionSource s,
const std::string &  t 
) [inline]

Parameters:
source a pointer to the object that generated this ActionEvent.
type source-specific type identifier to indicate what action occurred.

virtual code::ActionEvent::~ActionEvent (  )  [inline, virtual]

All classes should have virtual destructors.


Member Function Documentation

ActionSource* code::ActionEvent::getSource (  )  const [inline]

Returns a pointer to the object that generated this ActionEvent.

Returns:
a pointer to the object that generated this ActionEvent.

const std::string& code::ActionEvent::getType (  )  const [inline]

Returns a source-specific type identifier to indicate what action occurred.

Returns:
a source-specific type identifier to indicate what action occurred.


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7