org.eclipse.graphiti.pattern
Class AbstractBasePattern

java.lang.Object
  extended by org.eclipse.graphiti.pattern.AbstractBasePattern
All Implemented Interfaces:
IFeatureProviderHolder
Direct Known Subclasses:
AbstractConnectionPattern, AbstractPattern

public abstract class AbstractBasePattern
extends java.lang.Object
implements IFeatureProviderHolder

The Class AbstractBasePattern.


Field Summary
private  IFeatureProvider featureProvider
           
 
Constructor Summary
AbstractBasePattern()
           
 
Method Summary
 PictogramElement add(IAddContext context)
          Adds the.
 boolean canAdd(IAddContext context)
          Can add.
protected  java.lang.Object getBusinessObjectForPictogramElement(PictogramElement pe)
          Gets the business object for pictogram element.
protected  Diagram getDiagram()
          Gets the diagram.
protected  IDiagramEditor getDiagramEditor()
          Gets the diagram editor.
 IFeatureProvider getFeatureProvider()
          Gets the feature provider.
protected  IMappingProvider getMappingProvider()
          Gets the mapping provider.
protected  void link(PictogramElement pe, java.lang.Object businessObject)
          Link.
protected  void link(PictogramElement pe, java.lang.Object[] businessObjects)
          Link.
protected  Color manageColor(IColorConstant colorConstant)
          A convenient method for the color handling which simply calls Graphiti.getGaService().manageColor(...).
protected  Color manageColor(int red, int green, int blue)
          A convenient method for the color handling which simply calls Graphiti.getGaService().manageColor(...).
 void setFeatureProvider(IFeatureProvider featureProvider)
          Sets the feature provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

featureProvider

private IFeatureProvider featureProvider
Constructor Detail

AbstractBasePattern

public AbstractBasePattern()
Method Detail

add

public PictogramElement add(IAddContext context)
Adds the.

Parameters:
context - the add context
Returns:
the pictogram element

canAdd

public boolean canAdd(IAddContext context)
Can add.

Parameters:
context - the add context
Returns:
true, if successful

getFeatureProvider

public IFeatureProvider getFeatureProvider()
Gets the feature provider.

Specified by:
getFeatureProvider in interface IFeatureProviderHolder
Returns:
Returns the featureProvider.

setFeatureProvider

public void setFeatureProvider(IFeatureProvider featureProvider)
Sets the feature provider.

Parameters:
featureProvider - the new featureProvider

getBusinessObjectForPictogramElement

protected java.lang.Object getBusinessObjectForPictogramElement(PictogramElement pe)
Gets the business object for pictogram element.

Parameters:
pe - the pictogram element
Returns:
the business object for pictogram element

getDiagramEditor

protected IDiagramEditor getDiagramEditor()
Gets the diagram editor.

Returns:
the diagram editor

getMappingProvider

protected IMappingProvider getMappingProvider()
Gets the mapping provider.

Returns:
the mapping provider

link

protected void link(PictogramElement pe,
                    java.lang.Object businessObject)
Link.

Parameters:
pe - the pictogram element
businessObject - the business object

link

protected void link(PictogramElement pe,
                    java.lang.Object[] businessObjects)
Link.

Parameters:
pe - the pictogram element
businessObjects - the business objects

getDiagram

protected Diagram getDiagram()
Gets the diagram.

Returns:
the diagram

manageColor

protected Color manageColor(IColorConstant colorConstant)
A convenient method for the color handling which simply calls Graphiti.getGaService().manageColor(...).

Parameters:
colorConstant - the color constant
Returns:
the color

manageColor

protected Color manageColor(int red,
                            int green,
                            int blue)
A convenient method for the color handling which simply calls Graphiti.getGaService().manageColor(...).

Parameters:
red - the red
green - the green
blue - the blue
Returns:
the color


Copyright (c) SAP AG 2005, 2010.