com.japisoft.xmlpad.action
Class XMLAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.japisoft.xmlpad.action.XMLAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
CommentAction, CopyAction, CutAction, FormatAction, LoadAction, NewAction, ParseAction, PasteAction, RedoAction, SaveAction, SearchAction, SplitAction, UndoAction

public abstract class XMLAction
extends javax.swing.AbstractAction

Abstract class for XML action

Version:
1.2
Author:
(c) 2002 JAPISoft
See Also:
Serialized Form

Field Summary
static int IMAGE_SIZE
           
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
XMLAction()
           
XMLAction(java.lang.String actionReference)
          Reference for action for retreiving a same icon
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.lang.String getName()
          Return the name of the action.
 boolean hasFeature(java.lang.String feature)
           
 boolean isPopable()
           
abstract  boolean notifyAction()
          Notify action must be done.
 void setActionIcon(java.lang.String actionIcon)
          This is useful when replacing an action byanother one for retreiving the same icon
 void setFeature(java.lang.String feature, boolean enabled)
          Set a feature for the action
 void setPopable(boolean popable)
          Decide to include this action in a popup menu
 void setXMLContainer(XMLContainer container)
          Set the current XMLEditor for action
 void setXMLEditor(XMLEditor editor)
          Set the current XMLEditor for action
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_SIZE

public static int IMAGE_SIZE
Constructor Detail

XMLAction

public XMLAction()

XMLAction

public XMLAction(java.lang.String actionReference)
Reference for action for retreiving a same icon

Method Detail

setPopable

public void setPopable(boolean popable)
Decide to include this action in a popup menu


isPopable

public boolean isPopable()
Returns:
true if this action can be integrated in a popup menu

setActionIcon

public void setActionIcon(java.lang.String actionIcon)
This is useful when replacing an action byanother one for retreiving the same icon


setXMLEditor

public void setXMLEditor(XMLEditor editor)
Set the current XMLEditor for action


setXMLContainer

public void setXMLContainer(XMLContainer container)
Set the current XMLEditor for action


actionPerformed

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

notifyAction

public abstract boolean notifyAction()
Notify action must be done. It return false if the action is not accessible

Returns:
true if the action is possible

getName

public java.lang.String getName()
Return the name of the action. By default the class name is returned


setFeature

public void setFeature(java.lang.String feature,
                       boolean enabled)
Set a feature for the action


hasFeature

public boolean hasFeature(java.lang.String feature)
Returns:
true if this feature is available