Package org.eclipse.graphiti.mm.pictograms.impl

# Class DiagramImpl

java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.graphiti.mm.impl.PropertyContainerImpl
org.eclipse.graphiti.mm.impl.GraphicsAlgorithmContainerImpl
org.eclipse.graphiti.mm.pictograms.impl.PictogramElementImpl
org.eclipse.graphiti.mm.pictograms.impl.AnchorContainerImpl
org.eclipse.graphiti.mm.pictograms.impl.ShapeImpl
org.eclipse.graphiti.mm.pictograms.impl.ContainerShapeImpl
org.eclipse.graphiti.mm.pictograms.impl.DiagramImpl

All Implemented Interfaces:
  `org.eclipse.emf.common.notify.Notifier`, `org.eclipse.emf.ecore.EObject`, `org.eclipse.emf.ecore.InternalEObject`, `GraphicsAlgorithmContainer`, `AnchorContainer`, `ContainerShape`, `Diagram`, `PictogramElement`, `Shape`, `PropertyContainer`, `StyleContainer`

public class DiagramImpl extends ContainerShapeImpl implements Diagram
An implementation of the model object 'Diagram'.

The following features are implemented:

- `Styles`
- `Grid Unit`
- `Diagram Type Id`
- `Connections`
- `Name`
- `Snap To Grid`
- `Show Guides`
- `Colors`
- `Fonts`
- `Pictogram Links`
- `Vertical Grid Unit`
- `Version`

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

`org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl`

## Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

`org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList`

## Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject

`org.eclipse.emf.ecore.InternalEObject.EStore`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected org.eclipse.emf.common.util.EList<Color>`
`colors`
The cached value of the '`Colors`' containment reference list.
`protected org.eclipse.emf.common.util.EList<Connection>`
`connections`
The cached value of the '`Connections`' containment reference list.
`protected static final String`
`DIAGRAM_TYPE_ID_EDEFAULT`
The default value of the '`Diagram Type Id`' attribute.
`protected String`
`diagramTypeId`
The cached value of the '`Diagram Type Id`' attribute.
`protected org.eclipse.emf.common.util.EList<Font>`
`fonts`
The cached value of the '`Fonts`' containment reference list.
`protected static final int`
`GRID_UNIT_EDEFAULT`
The default value of the '`Grid Unit`' attribute.
`protected int`
`gridUnit`
The cached value of the '`Grid Unit`' attribute.
`protected String`
`name`
The cached value of the '`Name`' attribute.
`protected static final String`
`NAME_EDEFAULT`
The default value of the '`Name`' attribute.
`protected org.eclipse.emf.common.util.EList<PictogramLink>`
`pictogramLinks`
The cached value of the '`Pictogram Links`' reference list.
`protected static final boolean`
`SHOW_GUIDES_EDEFAULT`
Deprecated.
This attribute simply exists because of compatibility (after removing it old diagrams would not be readable any more).
`protected boolean`
`showGuides`
Deprecated.
This attribute simply exists because of compatibility (after removing it old diagrams would not be readable any more).
`protected static final boolean`
`SNAP_TO_GRID_EDEFAULT`
The default value of the '`Snap To Grid`' attribute.
`protected boolean`
`snapToGrid`
The cached value of the '`Snap To Grid`' attribute.
`protected org.eclipse.emf.common.util.EList<Style>`
`styles`
The cached value of the '`Styles`' containment reference list.
`protected String`
`version`
The cached value of the '`Version`' attribute.
`protected static final String`
`VERSION_EDEFAULT`
The default value of the '`Version`' attribute.
`protected static final int`
`VERTICAL_GRID_UNIT_EDEFAULT`
The default value of the '`Vertical Grid Unit`' attribute.
`protected int`
`verticalGridUnit`
The cached value of the '`Vertical Grid Unit`' attribute.

### Fields inherited from class org.eclipse.graphiti.mm.pictograms.impl.ContainerShapeImpl

`children`

### Fields inherited from class org.eclipse.graphiti.mm.pictograms.impl.AnchorContainerImpl

`anchors`

### Fields inherited from class org.eclipse.graphiti.mm.pictograms.impl.PictogramElementImpl

`active, ACTIVE_EDEFAULT, graphicsAlgorithm, link, visible, VISIBLE_EDEFAULT`

### Fields inherited from class org.eclipse.graphiti.mm.impl.PropertyContainerImpl

`properties`

### Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

`eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY`

### Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

`EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET`

### Fields inherited from interface org.eclipse.emf.ecore.InternalEObject

`EOPPOSITE_FEATURE_BASE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`DiagramImpl()`

## Method Summary

Modifier and Type
Method
Description
`int`
`eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)`
`int`
`eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)`
`Object`
`eGet(int featureID, boolean resolve, boolean coreType)`
`org.eclipse.emf.common.notify.NotificationChain`
`eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)`
`org.eclipse.emf.common.notify.NotificationChain`
`eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)`
`boolean`
`eIsSet(int featureID)`
`void`
`eSet(int featureID, Object newValue)`
`protected org.eclipse.emf.ecore.EClass`
`eStaticClass()`
`void`
`eUnset(int featureID)`
`org.eclipse.emf.common.util.EList<Color>`
`getColors()`
`org.eclipse.emf.common.util.EList<Connection>`
`getConnections()`
`String`
`getDiagramTypeId()`
`org.eclipse.emf.common.util.EList<Font>`
`getFonts()`
`int`
`getGridUnit()`
`String`
`getName()`
`org.eclipse.emf.common.util.EList<PictogramLink>`
`getPictogramLinks()`
`org.eclipse.emf.common.util.EList<Style>`
`getStyles()`
`String`
`getVersion()`
`int`
`getVerticalGridUnit()`
`boolean`
`isShowGuides()`
`boolean`
`isSnapToGrid()`
`void`
`setDiagramTypeId(String newDiagramTypeId)`
`void`
`setGridUnit(int newGridUnit)`
`void`
`setName(String newName)`
`void`
`setShowGuides(boolean newShowGuides)`
`void`
`setSnapToGrid(boolean newSnapToGrid)`
`void`
`setVersion(String newVersion)`
`void`
`setVerticalGridUnit(int newVerticalGridUnit)`
`String`
`toString()`

### Methods inherited from class org.eclipse.graphiti.mm.pictograms.impl.ContainerShapeImpl

`getChildren`

### Methods inherited from class org.eclipse.graphiti.mm.pictograms.impl.ShapeImpl

`basicGetContainer, basicSetContainer, eBasicRemoveFromContainerFeature, getContainer, setContainer`

### Methods inherited from class org.eclipse.graphiti.mm.pictograms.impl.AnchorContainerImpl

`getAnchors`

### Methods inherited from class org.eclipse.graphiti.mm.pictograms.impl.PictogramElementImpl

`basicGetGraphicsAlgorithm, basicGetLink, basicSetGraphicsAlgorithm, basicSetLink, getGraphicsAlgorithm, getLink, isActive, isVisible, setActive, setGraphicsAlgorithm, setLink, setVisible`

### Methods inherited from class org.eclipse.graphiti.mm.impl.PropertyContainerImpl

`getProperties`

### Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

`eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI`

### Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

`eAddVirtualValue, eAllContents, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues`

### Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

`eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.graphiti.mm.pictograms.AnchorContainer

`getAnchors`

### Methods inherited from interface org.eclipse.graphiti.mm.pictograms.ContainerShape

`getChildren`

### Methods inherited from interface org.eclipse.emf.ecore.EObject

`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

### Methods inherited from interface org.eclipse.emf.ecore.InternalEObject

`eNotificationRequired`

### Methods inherited from interface org.eclipse.emf.common.notify.Notifier

`eAdapters, eDeliver, eNotify, eSetDeliver`

### Methods inherited from interface org.eclipse.graphiti.mm.pictograms.PictogramElement

`getGraphicsAlgorithm, getLink, isActive, isVisible, setActive, setGraphicsAlgorithm, setLink, setVisible`

### Methods inherited from interface org.eclipse.graphiti.mm.PropertyContainer

`getProperties`

### Methods inherited from interface org.eclipse.graphiti.mm.pictograms.Shape

`getContainer, setContainer`

## Field Details

### styles

protected org.eclipse.emf.common.util.EList<Style> styles
The cached value of the '`Styles`' containment reference list.

See Also:
  - `getStyles()`

### GRID_UNIT_EDEFAULT

protected static final int GRID_UNIT_EDEFAULT
The default value of the '`Grid Unit`' attribute.

See Also:
  - `getGridUnit()`
  - Constant Field Values

### gridUnit

protected int gridUnit
The cached value of the '`Grid Unit`' attribute.

See Also:
  - `getGridUnit()`

### DIAGRAM_TYPE_ID_EDEFAULT

protected static final String DIAGRAM_TYPE_ID_EDEFAULT
The default value of the '`Diagram Type Id`' attribute.

See Also:
  - `getDiagramTypeId()`

### diagramTypeId

protected String diagramTypeId
The cached value of the '`Diagram Type Id`' attribute.

See Also:
  - `getDiagramTypeId()`

### connections

protected org.eclipse.emf.common.util.EList<Connection> connections
The cached value of the '`Connections`' containment reference list.

See Also:
  - `getConnections()`

### NAME_EDEFAULT

protected static final String NAME_EDEFAULT
The default value of the '`Name`' attribute.

See Also:
  - `getName()`

### name

protected String name
The cached value of the '`Name`' attribute.

See Also:
  - `getName()`

### SNAP_TO_GRID_EDEFAULT

protected static final boolean SNAP_TO_GRID_EDEFAULT
The default value of the '`Snap To Grid`' attribute.

See Also:
  - `isSnapToGrid()`
  - Constant Field Values

### snapToGrid

protected boolean snapToGrid
The cached value of the '`Snap To Grid`' attribute.

See Also:
  - `isSnapToGrid()`

### SHOW_GUIDES_EDEFAULT

protected static final boolean SHOW_GUIDES_EDEFAULT
Deprecated.
This attribute simply exists because of compatibility (after removing it old diagrams would not be readable any more). It is never evaluated, instead the Graphiti framework queries the tool behaviour provider if guides shall be shown in a diagram editor.
The default value of the '`Show Guides`' attribute.

See Also:
  - `isShowGuides()`
  - Constant Field Values

### showGuides

protected boolean showGuides
Deprecated.
This attribute simply exists because of compatibility (after removing it old diagrams would not be readable any more). It is never evaluated, instead the Graphiti framework queries the tool behaviour provider if guides shall be shown in a diagram editor.
The cached value of the '`Show Guides`' attribute.

See Also:
  - `isShowGuides()`

### colors

protected org.eclipse.emf.common.util.EList<Color> colors
The cached value of the '`Colors`' containment reference list.

See Also:
  - `getColors()`

### fonts

protected org.eclipse.emf.common.util.EList<Font> fonts
The cached value of the '`Fonts`' containment reference list.

See Also:
  - `getFonts()`

### pictogramLinks

protected org.eclipse.emf.common.util.EList<PictogramLink> pictogramLinks
The cached value of the '`Pictogram Links`' reference list.

See Also:
  - `getPictogramLinks()`

### VERTICAL_GRID_UNIT_EDEFAULT

protected static final int VERTICAL_GRID_UNIT_EDEFAULT
The default value of the '`Vertical Grid Unit`' attribute.

See Also:
  - `getVerticalGridUnit()`
  - Constant Field Values

### verticalGridUnit

protected int verticalGridUnit
The cached value of the '`Vertical Grid Unit`' attribute.

See Also:
  - `getVerticalGridUnit()`

### VERSION_EDEFAULT

protected static final String VERSION_EDEFAULT
The default value of the '`Version`' attribute.

See Also:
  - `getVersion()`
  - Constant Field Values

### version

protected String version
The cached value of the '`Version`' attribute.

See Also:
  - `getVersion()`

## Constructor Details

### DiagramImpl

protected DiagramImpl()

## Method Details

### eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
  `eStaticClass` in class `ContainerShapeImpl`

### getStyles

public org.eclipse.emf.common.util.EList<Style> getStyles()

Specified by:
  `getStyles` in interface `StyleContainer`
Returns:
  the value of the 'Styles' containment reference list.
See Also:
  - `MmPackage.getStyleContainer_Styles()`
  - `Style.getStyleContainer()`

### getGridUnit

public int getGridUnit()

Specified by:
  `getGridUnit` in interface `Diagram`
Returns:
  the value of the 'Grid Unit' attribute.
See Also:
  - `Diagram.setGridUnit(int)`
  - `PictogramsPackage.getDiagram_GridUnit()`

### setGridUnit

public void setGridUnit(int newGridUnit)

Specified by:
  `setGridUnit` in interface `Diagram`
Parameters:
  `newGridUnit` - the new value of the 'Grid Unit' attribute.
See Also:
  - `Diagram.getGridUnit()`

### getDiagramTypeId

public String getDiagramTypeId()

Specified by:
  `getDiagramTypeId` in interface `Diagram`
Returns:
  the value of the 'Diagram Type Id' attribute.
See Also:
  - `Diagram.setDiagramTypeId(String)`
  - `PictogramsPackage.getDiagram_DiagramTypeId()`

### setDiagramTypeId

public void setDiagramTypeId(String newDiagramTypeId)

Specified by:
  `setDiagramTypeId` in interface `Diagram`
Parameters:
  `newDiagramTypeId` - the new value of the 'Diagram Type Id' attribute.
See Also:
  - `Diagram.getDiagramTypeId()`

### getConnections

public org.eclipse.emf.common.util.EList<Connection> getConnections()

Specified by:
  `getConnections` in interface `Diagram`
Returns:
  the value of the 'Connections' containment reference list.
See Also:
  - `PictogramsPackage.getDiagram_Connections()`
  - `Connection.getParent()`

### getName

public String getName()

Specified by:
  `getName` in interface `Diagram`
Returns:
  the value of the 'Name' attribute.
See Also:
  - `Diagram.setName(String)`
  - `PictogramsPackage.getDiagram_Name()`

### setName

public void setName(String newName)

Specified by:
  `setName` in interface `Diagram`
Parameters:
  `newName` - the new value of the 'Name' attribute.
See Also:
  - `Diagram.getName()`

### isSnapToGrid

public boolean isSnapToGrid()

Specified by:
  `isSnapToGrid` in interface `Diagram`
Returns:
  the value of the 'Snap To Grid' attribute.
See Also:
  - `Diagram.setSnapToGrid(boolean)`
  - `PictogramsPackage.getDiagram_SnapToGrid()`

### setSnapToGrid

public void setSnapToGrid(boolean newSnapToGrid)

Specified by:
  `setSnapToGrid` in interface `Diagram`
Parameters:
  `newSnapToGrid` - the new value of the 'Snap To Grid' attribute.
See Also:
  - `Diagram.isSnapToGrid()`

### isShowGuides

public boolean isShowGuides()

### setShowGuides

public void setShowGuides(boolean newShowGuides)

### getColors

public org.eclipse.emf.common.util.EList<Color> getColors()

Specified by:
  `getColors` in interface `Diagram`
Returns:
  the value of the 'Colors' containment reference list.
See Also:
  - `PictogramsPackage.getDiagram_Colors()`

### getFonts

public org.eclipse.emf.common.util.EList<Font> getFonts()

Specified by:
  `getFonts` in interface `Diagram`
Returns:
  the value of the 'Fonts' containment reference list.
See Also:
  - `PictogramsPackage.getDiagram_Fonts()`

### getPictogramLinks

public org.eclipse.emf.common.util.EList<PictogramLink> getPictogramLinks()

Specified by:
  `getPictogramLinks` in interface `Diagram`
Returns:
  the value of the 'Pictogram Links' reference list.
See Also:
  - `PictogramsPackage.getDiagram_PictogramLinks()`

### getVerticalGridUnit

public int getVerticalGridUnit()

Specified by:
  `getVerticalGridUnit` in interface `Diagram`
Returns:
  the value of the 'Vertical Grid Unit' attribute.
See Also:
  - `Diagram.setVerticalGridUnit(int)`
  - `PictogramsPackage.getDiagram_VerticalGridUnit()`

### setVerticalGridUnit

public void setVerticalGridUnit(int newVerticalGridUnit)

Specified by:
  `setVerticalGridUnit` in interface `Diagram`
Parameters:
  `newVerticalGridUnit` - the new value of the 'Vertical Grid Unit' attribute.
See Also:
  - `Diagram.getVerticalGridUnit()`

### getVersion

public String getVersion()

Specified by:
  `getVersion` in interface `Diagram`
Returns:
  the value of the 'Version' attribute.
See Also:
  - `PictogramsPackage.getDiagram_Version()`

### setVersion

public void setVersion(String newVersion)

### eInverseAdd

public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
  `eInverseAdd` in class `ContainerShapeImpl`

### eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
  `eInverseRemove` in class `ContainerShapeImpl`

### eGet

public Object eGet(int featureID, boolean resolve, boolean coreType)

Specified by:
  `eGet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eGet` in class `ContainerShapeImpl`

### eSet

public void eSet(int featureID, Object newValue)

Specified by:
  `eSet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eSet` in class `ContainerShapeImpl`

### eUnset

public void eUnset(int featureID)

Specified by:
  `eUnset` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eUnset` in class `ContainerShapeImpl`

### eIsSet

public boolean eIsSet(int featureID)

Specified by:
  `eIsSet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eIsSet` in class `ContainerShapeImpl`

### eBaseStructuralFeatureID

public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)

Specified by:
  `eBaseStructuralFeatureID` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eBaseStructuralFeatureID` in class `org.eclipse.emf.ecore.impl.BasicEObjectImpl`

### eDerivedStructuralFeatureID

public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)

Specified by:
  `eDerivedStructuralFeatureID` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eDerivedStructuralFeatureID` in class `org.eclipse.emf.ecore.impl.BasicEObjectImpl`

### toString

public String toString()

Overrides:
  `toString` in class `PictogramElementImpl`