Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

com.arcle.rmt.j2se.swing.ui.ActionWrapper Class Reference

Base class for decorators of Action classes. More...

Inheritance diagram for com.arcle.rmt.j2se.swing.ui.ActionWrapper:

com.arcle.rmt.j2se.swing.ui.ComponentOwnedActionWrapper com.arcle.rmt.j2se.swing.ui.ExceptionSafeActionWrapper List of all members.

Public Member Functions

 ActionWrapper (Action wrapped)
 Constructs the wrapper.

void actionPerformed (ActionEvent e)
 Template method which wraps the doActionPerformed event handler with an exception-handling construct.

Object getValue (String key)
 Gets one of this object's properties using the associated key.

void putValue (String key, Object value)
 Sets one of this object's properties using the associated key.

void setEnabled (boolean b)
 Sets the enabled state of the Action.

boolean isEnabled ()
 Returns the enabled state of the Action.

void addPropertyChangeListener (PropertyChangeListener listener)
 Adds a PropertyChange listener.

void removePropertyChangeListener (PropertyChangeListener listener)
 Removes a PropertyChange listener.


Protected Member Functions

Action getWrappedObject ()
 Returns the wrapper object.


Private Attributes

Action _wrappedObject
 The object being wrapped.


Detailed Description

Base class for decorators of Action classes.

All of this class' methods does nothing by themselves -- they only forward the call to the wrapped object.

Author:
Sasmito Adibowo
Version:
Id
ActionWrapper.java,v 1.4 2003/05/15 19:43:46 adib Exp

Definition at line 74 of file ActionWrapper.java.


Constructor & Destructor Documentation

com.arcle.rmt.j2se.swing.ui.ActionWrapper.ActionWrapper Action  wrapped  ) 
 

Constructs the wrapper.

Parameters:
wrapped The action object being wrapped.

Definition at line 80 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper._wrappedObject.


Member Function Documentation

void com.arcle.rmt.j2se.swing.ui.ActionWrapper.actionPerformed ActionEvent  e  ) 
 

Template method which wraps the doActionPerformed event handler with an exception-handling construct.

When the wrapped event handler throws an exception, the exception is shown in a dialog.

Reimplemented in com.arcle.rmt.j2se.swing.ui.ExceptionSafeActionWrapper.

Definition at line 101 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

void com.arcle.rmt.j2se.swing.ui.ActionWrapper.addPropertyChangeListener PropertyChangeListener  listener  ) 
 

Adds a PropertyChange listener.

Containers and attached components use these methods to register interest in this Action object. When its enabled state or other property changes, the registered listeners are informed of the change.

Parameters:
listener a PropertyChangeListener object

Definition at line 164 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

Object com.arcle.rmt.j2se.swing.ui.ActionWrapper.getValue String  key  ) 
 

Gets one of this object's properties using the associated key.

See also:
putValue

Definition at line 111 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

Referenced by com.arcle.rmt.j2se.swing.ui.ExceptionSafeActionWrapper.actionPerformed().

Action com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject  )  [protected]
 

Returns the wrapper object.

Definition at line 87 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper._wrappedObject.

Referenced by com.arcle.rmt.j2se.swing.ui.ActionWrapper.actionPerformed(), com.arcle.rmt.j2se.swing.ui.ActionWrapper.addPropertyChangeListener(), com.arcle.rmt.j2se.swing.ui.ActionWrapper.getValue(), com.arcle.rmt.j2se.swing.ui.ActionWrapper.isEnabled(), com.arcle.rmt.j2se.swing.ui.ActionWrapper.putValue(), com.arcle.rmt.j2se.swing.ui.ActionWrapper.removePropertyChangeListener(), and com.arcle.rmt.j2se.swing.ui.ActionWrapper.setEnabled().

boolean com.arcle.rmt.j2se.swing.ui.ActionWrapper.isEnabled  ) 
 

Returns the enabled state of the Action.

When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.

Returns:
true if this Action is enabled

Definition at line 151 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

void com.arcle.rmt.j2se.swing.ui.ActionWrapper.putValue String  key,
Object  value
 

Sets one of this object's properties using the associated key.

If the value has changed, a PropertyChangeEvent is sent to listeners.

Parameters:
key a String containing the key
value an Object value

Definition at line 125 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

void com.arcle.rmt.j2se.swing.ui.ActionWrapper.removePropertyChangeListener PropertyChangeListener  listener  ) 
 

Removes a PropertyChange listener.

Parameters:
listener a PropertyChangeListener object
See also:
addPropertyChangeListener

Definition at line 175 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().

void com.arcle.rmt.j2se.swing.ui.ActionWrapper.setEnabled boolean  b  ) 
 

Sets the enabled state of the Action.

When enabled, any component associated with this object is active and able to fire this object's actionPerformed method. If the value has changed, a PropertyChangeEvent is sent to listeners.

Parameters:
b true to enable this Action, false to disable it

Definition at line 139 of file ActionWrapper.java.

References com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().


Member Data Documentation

Action com.arcle.rmt.j2se.swing.ui.ActionWrapper._wrappedObject [private]
 

The object being wrapped.

Definition at line 94 of file ActionWrapper.java.

Referenced by com.arcle.rmt.j2se.swing.ui.ActionWrapper.ActionWrapper(), and com.arcle.rmt.j2se.swing.ui.ActionWrapper.getWrappedObject().


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 19:53:25 2004 for Arcle Rambutan by doxygen 1.3.5