com.japisoft.xmlpad.action
Class XMLActionForSelection

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bycom.japisoft.xmlpad.action.XMLAction
          extended bycom.japisoft.xmlpad.action.XMLActionForSelection
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, ActivateOnSelection, java.lang.Cloneable, java.util.EventListener, Features, Properties, java.io.Serializable
Direct Known Subclasses:
CopyAction, CutAction, FastCommentUncommentAction, SurroundCDATAAction, SurroundTagAction

public class XMLActionForSelection
extends XMLAction
implements ActivateOnSelection

This is a basic class for enabling/disabling action for a text selection. As a sample the copy action inherits from this class because it mustn't be enabled when no text selection has been done.

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.japisoft.xmlpad.action.XMLAction
XMLAction.EmptyIcon
 
Field Summary
 
Fields inherited from class com.japisoft.xmlpad.action.XMLAction
AUTO_UI, container, editor, groupName, IMAGE_EXT, IMAGE_SIZE, INVALID_ACTION, param, RESOURCE_BUNDLE, VALID_ACTION
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface com.japisoft.xmlpad.action.Features
VALIDATING_FEATURE
 
Fields inherited from interface com.japisoft.xmlpad.action.Properties
FILE_ENCODING, INDENT_CHAR_PROPERTY, INDENT_SIZE_PROPERTY
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
XMLActionForSelection()
           
XMLActionForSelection(java.lang.String name)
           
 
Method Summary
 boolean notifyAction()
          Notify action must be done.
protected  void notifyXMLContainer()
          Notify that an XMLContainer has been provided for futur action
 
Methods inherited from class com.japisoft.xmlpad.action.XMLAction
actionPerformed, autoRequestFocus, dispose, getDefaultAccelerator, getDefaultIcon, getDefaultLabel, getDefaultMnemonic, getDefaultTooltip, getLabel, getName, getParam, getPopupGroup, getProperty, getXMLContainer, getXMLEditor, hasFeature, installUIContent, isPopable, isToolbarable, notifyXMLEditor, setActionDelegate, setActionReferenceGroup, setActionReferenceIcon, setFeature, setParam, setPopable, setProperty, setToolbarable, setXMLContainer, setXMLEditor
 
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
 

Constructor Detail

XMLActionForSelection

public XMLActionForSelection()

XMLActionForSelection

public XMLActionForSelection(java.lang.String name)
Method Detail

notifyXMLContainer

protected void notifyXMLContainer()
Description copied from class: XMLAction
Notify that an XMLContainer has been provided for futur action

Overrides:
notifyXMLContainer in class XMLAction

notifyAction

public boolean notifyAction()
Description copied from class: XMLAction
Notify action must be done. It returns INVALID_ACTION if the action is not accessible and VALID_ACTION if this is correct.

Specified by:
notifyAction in class XMLAction
Returns:
VALID_ACTION if the action is possible and else INVALID_ACTION


Copyright © 2006 JAPISoft. All Rights Reserved.