Inheritance diagram for code::ActionEvent:
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).
Public Member Functions
|ActionSource *||getSource () 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)|
|All classes should have virtual destructors. |
|const std::string &||t|
|source||a pointer to the object that generated this ActionEvent.|
|type||source-specific type identifier to indicate what action occurred.|
All classes should have virtual destructors.
|ActionSource* code::ActionEvent::getSource||(||)|| const
|const std::string& code::ActionEvent::getType||(||)|| const
Returns a source-specific type identifier to indicate what action occurred.