站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

CommandActionSupporter (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.actions
Class CommandActionSupporter

java.lang.Object
  extended byorg.netbeans.modules.vcscore.actions.CommandActionSupporter
Direct Known Subclasses:
VcsActionSupporter

public abstract class CommandActionSupporter
extends Object

OBject that needs to be return as an attribute of all fileobjects that support the Abstract/GeneralCommandAction framework and all the actions that subclass these two classes. The name of the attribute is in AbstractCommandAction.VCS_ACTION_ATTRIBUTE.


Constructor Summary
CommandActionSupporter()
          Creates new CommandActionSupporter
 
Method Summary
 String getMenuDisplayName(GeneralCommandAction action)
          If the supporter enables the action, it can then add supporter-specific description to the menu name.
 String getPopupDisplayName(GeneralCommandAction action)
          If the supporter enables the action, it can then add supporter-specific description to the popup menu name.
 String getToolBarDisplayName(GeneralCommandAction action)
          If the supporter enables the action, it can then add supporter-specific description to the toolbar tooltip.
abstract  boolean isEnabled(GeneralCommandAction action, FileObject[] fileObjects)
          GeneralCommandAction asks the supporter during the enabled(Node[] nodes) method.
abstract  void performAction(GeneralCommandAction action, FileObject[] fileObjects)
          GeneralCommandAction tells the supporter during the performsAction(Node[] nodes) method to perform the action on the specified FileObjects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandActionSupporter

public CommandActionSupporter()
Creates new CommandActionSupporter

Method Detail

isEnabled

public abstract boolean isEnabled(GeneralCommandAction action,
                                  FileObject[] fileObjects)
GeneralCommandAction asks the supporter during the enabled(Node[] nodes) method. The supporter should return if the specified fileobjects are supported for the specified action.

Parameters:
action - The action that initiated this request.
fileObjects - Array of fileObjects extracted from the Activated nodes.

performAction

public abstract void performAction(GeneralCommandAction action,
                                   FileObject[] fileObjects)
GeneralCommandAction tells the supporter during the performsAction(Node[] nodes) method to perform the action on the specified FileObjects. This is called from GeneralCommandAction in AWT thread. RequestProcessor needs to be used to leave the AWT thread if necessary.

Parameters:
action - The action that initiated this request.
fileObjects - Array of fileObjects extracted from the Activated nodes.

getToolBarDisplayName

public String getToolBarDisplayName(GeneralCommandAction action)
If the supporter enables the action, it can then add supporter-specific description to the toolbar tooltip. (use with caution.) Experimental


getMenuDisplayName

public String getMenuDisplayName(GeneralCommandAction action)
If the supporter enables the action, it can then add supporter-specific description to the menu name. (use with caution.) Experimental


getPopupDisplayName

public String getPopupDisplayName(GeneralCommandAction action)
If the supporter enables the action, it can then add supporter-specific description to the popup menu name. (use with caution.) Experimental


 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.