org.eclipse.graphiti.pattern
Class AddFeatureForPattern

java.lang.Object
  extended by org.eclipse.graphiti.features.impl.AbstractFeature
      extended by org.eclipse.graphiti.features.impl.AbstractAddFeature
          extended by org.eclipse.graphiti.pattern.AddFeatureForPattern
All Implemented Interfaces:
IAddFeature, IFeature, IFeatureProviderHolder, IAdd, IDescription, IName

public class AddFeatureForPattern
extends AbstractAddFeature

The Class AddFeatureForPattern.


Field Summary
private  IAdd pattern
           
 
Fields inherited from class org.eclipse.graphiti.features.impl.AbstractAddFeature
EMPTY
 
Constructor Summary
AddFeatureForPattern(IFeatureProvider featureProvider, IAdd pattern)
          Creates a new AddFeatureForPattern.
 
Method Summary
 PictogramElement add(IAddContext context)
          Executes the add.
 boolean canAdd(IAddContext context)
          Checks, if the add can be executed.
 
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractAddFeature
canExecute, execute, getName
 
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, setProgressCallback, toString, updatePictogramElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.features.IFeature
canUndo, hasDoneChanges, isAvailable
 
Methods inherited from interface org.eclipse.graphiti.IDescription
getDescription
 
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
 

Field Detail

pattern

private IAdd pattern
Constructor Detail

AddFeatureForPattern

public AddFeatureForPattern(IFeatureProvider featureProvider,
                            IAdd pattern)
Creates a new AddFeatureForPattern.

Parameters:
featureProvider - the feature provider
pattern - the pattern
Method Detail

canAdd

public boolean canAdd(IAddContext context)
Description copied from interface: IAdd
Checks, if the add can be executed.

Parameters:
context - the context needed to execute the add
Returns:
true, if the add can be executed

add

public PictogramElement add(IAddContext context)
Description copied from interface: IAdd
Executes the add.

Parameters:
context - the context needed to execute the add
Returns:
the added pictogram element


Copyright (c) SAP AG 2005, 2010.