| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.spi.vcs.commands.CommandSupport
| Constructor Summary | |
CommandSupport(Class commandClass)
Creates a new instance of CommandSupport.  | 
|
CommandSupport(Class[] commandClasses)
Creates a new instance of CommandSupport.  | 
|
| Method Summary | |
protected  boolean | 
canExecute(CommandTask task)
Tell, whether the task can be executed now.  | 
protected abstract  Object | 
clone()
Subclasses need to implement the clone() method in order the command creation work properly.  | 
 Command | 
createCommand()
Use this method to actually create the command.  | 
protected  CommandTaskSupport | 
createTask(Command taskCommand)
Create the CommandTask, that is supposed to execute the command.  | 
protected abstract  int | 
execute(CommandTask task)
Perform the actual execution of the command from the provided info.  | 
abstract  FileObject[] | 
getApplicableFiles(FileObject[] files)
Find, whether this command can act on a set of files.  | 
protected  Command | 
getCommand()
Get the command associated with this command support.  | 
protected  Command | 
getCommand(CommandTask task)
Get the command associated with the given task.  | 
abstract  String | 
getDisplayName()
Get the display name of the command.  | 
protected  EventListener[] | 
getListeners(Class listenerType,
             Command command)
Get the event listeners attached to the associated command, if any.  | 
abstract  String | 
getName()
Get the name of the command.  | 
abstract  boolean | 
hasExpertMode()
Whether the command supports an expert mode.  | 
protected  void | 
initializeCommand(Command cmd)
Initialize the command after it's created.  | 
protected  void | 
stop(CommandTask task)
Stop the command's execution.  | 
| Methods inherited from class java.lang.Object | 
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public CommandSupport(Class commandClass)
commandClass - The class of the command, that is implemented.public CommandSupport(Class[] commandClasses)
| Method Detail | 
public abstract String getName()
public abstract String getDisplayName()
null, the command will not be visible on the popup menu.
public abstract FileObject[] getApplicableFiles(FileObject[] files)
files - The array of files to inspect
null when
 it can not act on any file listed.public abstract boolean hasExpertMode()
public final Command createCommand()
Command
 associated with the clonned CommandSupport instance.
Command.protected void initializeCommand(Command cmd)
cmd - The command to be customized.protected final Command getCommand()
Command or
         null if this support does not have any command associated.protected final Command getCommand(CommandTask task) throws IllegalArgumentException
task - The task to get the command for.
IllegalArgumentException - if the task is of an unknown instance.protected boolean canExecute(CommandTask task)
true if the task is to be executed immediately. This is the
                           default implementation.
         false if the task should not be executed at this time.
                            In this case the method will be called later to check
                            whether the task can be executed already.protected abstract int execute(CommandTask task)
protected CommandTaskSupport createTask(Command taskCommand)
CommandTaskSupport.
taskCommand - The copy of the customized command, that can be used
                    by the task to get the customized information.
protected void stop(CommandTask task)
protected final EventListener[] getListeners(Class listenerType, Command command)
listenerType - The type of listeners we're looking for.command - The command, to get the listeners from.
null.protected abstract Object clone() throws CloneNotSupportedException
CloneNotSupportedException
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||