org.relayirc.swingui
Class ChatAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.relayirc.swingui.ChatAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, IChatAction, java.io.Serializable

public abstract class ChatAction
extends javax.swing.AbstractAction
implements IChatAction

Makes it easier to implement actions.

Version:
$Revision: 1.4.2.4 $

The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Original Code: Relay-JFC Chat Client
Initial Developer: David M. Johnson
Contributor(s): No contributors to this file
Copyright (C) 1997-2000 by David M. Johnson
All Rights Reserved.
Author:
David M. Johnson
See Also:
Serialized Form

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
ChatAction(java.lang.String desc, javax.swing.Icon icon)
           
 
Method Summary
 javax.swing.AbstractAction getActionObject()
          Get the actual action object.
 java.lang.Object getContext()
          Set the context for the action.
 void setContext(java.lang.Object context)
          Set the context for the action.
 void update()
          Set enabled or disabled, depending on chat app state.
 
Methods inherited from class javax.swing.AbstractAction
actionPerformed, addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatAction

public ChatAction(java.lang.String desc,
                  javax.swing.Icon icon)
Method Detail

getContext

public java.lang.Object getContext()
Set the context for the action.
Specified by:
getContext in interface IChatAction

setContext

public void setContext(java.lang.Object context)
Set the context for the action.
Specified by:
setContext in interface IChatAction

getActionObject

public javax.swing.AbstractAction getActionObject()
Description copied from interface: IChatAction
Get the actual action object.
Specified by:
getActionObject in interface IChatAction

update

public void update()
Description copied from interface: IChatAction
Set enabled or disabled, depending on chat app state.
Specified by:
update in interface IChatAction