Package org.eclipse.graphiti.features.context.impl

# Class PasteContext

java.lang.Object
org.eclipse.graphiti.PropertyBag
org.eclipse.graphiti.internal.features.context.impl.base.DefaultContext
org.eclipse.graphiti.internal.features.context.impl.base.PictogramElementsContext
org.eclipse.graphiti.features.context.impl.PasteContext

All Implemented Interfaces:
  `IContext`, `ILocationContext`, `IPasteContext`, `IPictogramElementsContext`, `IPropertyBag`

public class PasteContext extends PictogramElementsContext implements IPasteContext
The Class PasteContext.

## Constructor Summary

Constructors
Constructor
Description
`PasteContext(PictogramElement[] pictogramElements)`
Creates a new `PasteContext`.
`PasteContext(PictogramElement[] pictogramElements, int pasteLocationX, int pasteLocationY)`
Creates a new `PasteContext`.

## Method Summary

Modifier and Type
Method
Description
`int`
`getX()`
Gets the x location to paste to
`int`
`getY()`
Gets the y location to paste to
`void`
`setLocation(int x, int y)`
Sets the location to paste to
`void`
`setX(int x)`
Sets the x location to paste to
`void`
`setY(int y)`
Sets the y location to paste to

### Methods inherited from class org.eclipse.graphiti.internal.features.context.impl.base.PictogramElementsContext

`getPictogramElements, setPictogramElements, toString`

### Methods inherited from class org.eclipse.graphiti.PropertyBag

`getProperty, getPropertyKeys, putProperty`

### 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.IPictogramElementsContext

`getPictogramElements, setPictogramElements`

### Methods inherited from interface org.eclipse.graphiti.IPropertyBag

`getProperty, getPropertyKeys, putProperty`

## Constructor Details

### PasteContext

public PasteContext(PictogramElement[] pictogramElements)
Creates a new `PasteContext`.

Parameters:
  `pictogramElements` - the pictogram elements

### PasteContext

public PasteContext(PictogramElement[] pictogramElements, int pasteLocationX, int pasteLocationY)
Creates a new `PasteContext`.

Parameters:
  `pictogramElements` - the pictogram elements
  `pasteLocationX` - the x location to paste to
  `pasteLocationY` - the y location to paste to
Since:
  0.9

## Method Details

### getX

public int getX()
Gets the x location to paste to

Specified by:
  `getX` in interface `ILocationContext`
Returns:
  an integer representing the x location
Since:
  0.9

### setX

public void setX(int x)
Sets the x location to paste to

Parameters:
  `x` - an integer representing the x location
Since:
  0.9

### getY

public int getY()
Gets the y location to paste to

Specified by:
  `getY` in interface `ILocationContext`
Returns:
  an integer representing the y location
Since:
  0.9

### setY

public void setY(int y)
Sets the y location to paste to

Parameters:
  `y` - an integer representing the y location
Since:
  0.9

### setLocation

public void setLocation(int x, int y)
Sets the location to paste to

Parameters:
  `x` - an integer representing the x location
  `y` - an integer representing the y location
Since:
  0.9