org.tanager.ui
Class CPowerButtonAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.tanager.ui.CPowerButtonAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class CPowerButtonAction
extends javax.swing.AbstractAction

This class encapsulates the concept of an action to be taken on a Power button press.

Version:
$Revision: 1.4.2.1 $
Author:
Bob Lavey
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           Represents the universal version ID of this class.
private  IPowerButtonCallback theCallback_
           Represents the association with the callback implementor.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CPowerButtonAction(IPowerButtonCallback callback, java.lang.String text)
           This is the only contructor allowed for a CPowerButtonAction object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
           This method is called whenever the power button to which this object has been attached is pressed.
protected  IPowerButtonCallback getTheCallback()
           Poseidon-generated accessor method.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

Represents the universal version ID of this class. This ID is recommended for all classes that implement the Serializable interface.

See Also:
Constant Field Values

theCallback_

private IPowerButtonCallback theCallback_

Represents the association with the callback implementor.

Constructor Detail

CPowerButtonAction

public CPowerButtonAction(IPowerButtonCallback callback,
                          java.lang.String text)

This is the only contructor allowed for a CPowerButtonAction object. This constructor initializes the super class and the association with the callback implementor.

Semantics:
  1. pass the given text to the parent class's constructor
  2. initialize the association with the callback implementor

Parameters:
callback - a reference to the IPowerButtonCallback implementor
text - the text for the menu option
Method Detail

getTheCallback

protected IPowerButtonCallback getTheCallback()

Poseidon-generated accessor method.

Returns:
the IPowerButtonCallback implementor

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)

This method is called whenever the power button to which this object has been attached is pressed.

Semantics:
  1. call the callback implementor's powerButtonPressed() method

Parameters:
arg0 - the event that occurred