/******************************************************************************* | |
* <copyright> | |
* | |
* Copyright (c) 2013, 2013 SAP AG. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* SAP AG - initial API, implementation and documentation | |
* | |
* </copyright> | |
* | |
*******************************************************************************/ | |
package org.eclipse.fmc.blockdiagram.editor.features.add; | |
import org.eclipse.graphiti.features.IFeatureProvider; | |
import org.eclipse.graphiti.features.context.IAddContext; | |
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle; | |
import org.eclipse.graphiti.mm.pictograms.PictogramElement; | |
/** | |
* This class is responsible for creating the graphical representation of | |
* structure variances which are special storages. | |
* | |
* @author Benjamin Schmeling | |
* | |
*/ | |
public class StructureVarianceAddFeature extends StorageAddFeature { | |
/** | |
* Default constructor. | |
* | |
* @param featureProvider | |
* The feature provider. | |
*/ | |
public StructureVarianceAddFeature(IFeatureProvider featureProvider) { | |
super(featureProvider); | |
} | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.eclipse.fmc.blockdiagram.editor.features.add.FMCNodeAddFeature#add(org.eclipse | |
* .graphiti.features.context.IAddContext) | |
*/ | |
@Override | |
public PictogramElement add(IAddContext context) { | |
PictogramElement pictogramElement = super.add(context); | |
// TODO How to increase the distance between the gaps? | |
pictogramElement.getGraphicsAlgorithm().getGraphicsAlgorithmChildren() | |
.get(0).setLineStyle(LineStyle.DASH); | |
return pictogramElement; | |
} | |
} |