org.eclipse.graphiti.features.context.impl
Class AddContext

java.lang.Object
  extended by DefaultContext
      extended by org.eclipse.graphiti.features.context.impl.LocationContext
          extended by org.eclipse.graphiti.features.context.impl.AreaContext
              extended by org.eclipse.graphiti.features.context.impl.AddContext
All Implemented Interfaces:
IAddContext, IAreaContext, IContext, ILocationContext, ITargetConnectionContext, ITargetContext, IPropertyBag
Direct Known Subclasses:
AddConnectionContext

public class AddContext
extends AreaContext
implements IAddContext

The Class AddContext.


Field Summary
private  java.lang.Object newObject
           
private  Connection targetConnection
           
private  ContainerShape targetContainer
           
 
Constructor Summary
AddContext()
          Creates a new AddContext.
AddContext(IAreaContext context, java.lang.Object newObject)
          Creates a new AddContext.
 
Method Summary
 java.lang.Object getNewObject()
          A pictogram element has to be added.
 Connection getTargetConnection()
          Gets the target connection.
 ContainerShape getTargetContainer()
          Gets the target container.
 void setNewObject(java.lang.Object newObject)
          Sets the new object.
 void setTargetConnection(Connection targetConnection)
          Sets the target connection.
 void setTargetContainer(ContainerShape targetContainer)
          Sets the target container.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.graphiti.features.context.impl.AreaContext
getHeight, getWidth, setHeight, setSize, setWidth
 
Methods inherited from class org.eclipse.graphiti.features.context.impl.LocationContext
getX, getY, setLocation, setX, setY
 
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.context.IAreaContext
getHeight, getWidth
 
Methods inherited from interface org.eclipse.graphiti.features.context.ILocationContext
getX, getY
 
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, putProperty
 

Field Detail

targetContainer

private ContainerShape targetContainer

targetConnection

private Connection targetConnection

newObject

private java.lang.Object newObject
Constructor Detail

AddContext

public AddContext()
Creates a new AddContext.


AddContext

public AddContext(IAreaContext context,
                  java.lang.Object newObject)
Creates a new AddContext.

Parameters:
context - the context
newObject - the new object
Method Detail

getNewObject

public java.lang.Object getNewObject()
Description copied from interface: IAddContext
A pictogram element has to be added. This pictogram element has to link to a domain model element.

Specified by:
getNewObject in interface IAddContext
Returns:
instance of a domain model element

getTargetConnection

public Connection getTargetConnection()
Description copied from interface: ITargetConnectionContext
Gets the target connection.

Specified by:
getTargetConnection in interface ITargetConnectionContext
Returns:
the target connection where the new pictogram element (currently this has to be a shape) has to be inserted

getTargetContainer

public ContainerShape getTargetContainer()
Description copied from interface: ITargetContext
Gets the target container.

Specified by:
getTargetContainer in interface ITargetContext
Returns:
the target container shape where the new pictogram element (currently this has to be a shape) has to be added

setNewObject

public void setNewObject(java.lang.Object newObject)
Sets the new object.

Parameters:
newObject - the new object

setTargetContainer

public void setTargetContainer(ContainerShape targetContainer)
Sets the target container.

Parameters:
targetContainer - The target container to set.

setTargetConnection

public void setTargetConnection(Connection targetConnection)
Sets the target connection.

Parameters:
targetConnection - The target connection to set.

toString

public java.lang.String toString()
Overrides:
toString in class AreaContext


Copyright (c) SAP AG 2005, 2010.