Class CommandContainer
- java.lang.Object
-
- org.eclipse.graphiti.internal.command.CommandContainer
-
- All Implemented Interfaces:
IFeatureProviderHolder,IDescription,ICommand
public class CommandContainer extends java.lang.Object implements ICommand
The Class CommandContainer.
-
-
Constructor Summary
Constructors Constructor Description CommandContainer(IFeatureProvider featureProvider)Instantiates a new command container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ICommand command)Adds the.booleancanExecute()Can execute.booleancanUndo()Can undo.booleancontainsCommands()Contains commands.booleanexecute()Execute.ICommand[]getCommands()Gets the commands.java.lang.StringgetDescription()Gets the description.IFeatureProvidergetFeatureProvider()Gets the feature provider.booleanundo()Undo.
-
-
-
Constructor Detail
-
CommandContainer
public CommandContainer(IFeatureProvider featureProvider)
Instantiates a new command container.- Parameters:
featureProvider- the feature provider
-
-
Method Detail
-
canExecute
public boolean canExecute()
Description copied from interface:ICommandCan execute.- Specified by:
canExecutein interfaceICommand- Returns:
- true, if successful
-
execute
public boolean execute()
Description copied from interface:ICommandExecute.
-
canUndo
public boolean canUndo()
Description copied from interface:ICommandCan undo.
-
undo
public boolean undo()
Description copied from interface:ICommandUndo.
-
add
public void add(ICommand command)
Adds the.- Parameters:
command- the command
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IDescriptionGets the description.- Specified by:
getDescriptionin interfaceIDescription- Returns:
- the description
-
containsCommands
public boolean containsCommands()
Contains commands.- Returns:
- true, if successful
-
getFeatureProvider
public IFeatureProvider getFeatureProvider()
Description copied from interface:IFeatureProviderHolderGets the feature provider.- Specified by:
getFeatureProviderin interfaceIFeatureProviderHolder- Returns:
- the feature provider
-
getCommands
public ICommand[] getCommands()
Gets the commands.- Returns:
- the commands
-
-