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 void
add(ICommand command)
Adds the.boolean
canExecute()
Can execute.boolean
canUndo()
Can undo.boolean
containsCommands()
Contains commands.boolean
execute()
Execute.ICommand[]
getCommands()
Gets the commands.java.lang.String
getDescription()
Gets the description.IFeatureProvider
getFeatureProvider()
Gets the feature provider.boolean
undo()
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:ICommand
Can execute.- Specified by:
canExecute
in interfaceICommand
- Returns:
- true, if successful
-
execute
public boolean execute()
Description copied from interface:ICommand
Execute.
-
canUndo
public boolean canUndo()
Description copied from interface:ICommand
Can undo.
-
undo
public boolean undo()
Description copied from interface:ICommand
Undo.
-
add
public void add(ICommand command)
Adds the.- Parameters:
command
- the command
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IDescription
Gets the description.- Specified by:
getDescription
in interfaceIDescription
- Returns:
- the description
-
containsCommands
public boolean containsCommands()
Contains commands.- Returns:
- true, if successful
-
getFeatureProvider
public IFeatureProvider getFeatureProvider()
Description copied from interface:IFeatureProviderHolder
Gets the feature provider.- Specified by:
getFeatureProvider
in interfaceIFeatureProviderHolder
- Returns:
- the feature provider
-
getCommands
public ICommand[] getCommands()
Gets the commands.- Returns:
- the commands
-
-