blob: 643146da15e3d10cac808d9b895e661e9de89e09 [file] [log] [blame]
/*********************************************************************
* Copyright (c) 2005, 2019 SAP SE
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* SAP SE - initial API, implementation and documentation
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.graphiti.mm.pictograms.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.graphiti.mm.pictograms.AdvancedAnchor;
import org.eclipse.graphiti.mm.pictograms.PictogramsPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Advanced Anchor</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.graphiti.mm.pictograms.impl.AdvancedAnchorImpl#isUseAnchorLocationAsConnectionEndpoint <em>Use Anchor Location As Connection Endpoint</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class AdvancedAnchorImpl extends AnchorImpl implements AdvancedAnchor {
/**
* The default value of the '{@link #isUseAnchorLocationAsConnectionEndpoint() <em>Use Anchor Location As Connection Endpoint</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isUseAnchorLocationAsConnectionEndpoint()
* @generated
* @ordered
*/
protected static final boolean USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT_EDEFAULT = false;
/**
* The cached value of the '{@link #isUseAnchorLocationAsConnectionEndpoint() <em>Use Anchor Location As Connection Endpoint</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isUseAnchorLocationAsConnectionEndpoint()
* @generated
* @ordered
*/
protected boolean useAnchorLocationAsConnectionEndpoint = USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected AdvancedAnchorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PictogramsPackage.Literals.ADVANCED_ANCHOR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isUseAnchorLocationAsConnectionEndpoint() {
return useAnchorLocationAsConnectionEndpoint;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setUseAnchorLocationAsConnectionEndpoint(boolean newUseAnchorLocationAsConnectionEndpoint) {
boolean oldUseAnchorLocationAsConnectionEndpoint = useAnchorLocationAsConnectionEndpoint;
useAnchorLocationAsConnectionEndpoint = newUseAnchorLocationAsConnectionEndpoint;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PictogramsPackage.ADVANCED_ANCHOR__USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT, oldUseAnchorLocationAsConnectionEndpoint, useAnchorLocationAsConnectionEndpoint));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PictogramsPackage.ADVANCED_ANCHOR__USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT:
return isUseAnchorLocationAsConnectionEndpoint();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PictogramsPackage.ADVANCED_ANCHOR__USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT:
setUseAnchorLocationAsConnectionEndpoint((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PictogramsPackage.ADVANCED_ANCHOR__USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT:
setUseAnchorLocationAsConnectionEndpoint(USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PictogramsPackage.ADVANCED_ANCHOR__USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT:
return useAnchorLocationAsConnectionEndpoint != USE_ANCHOR_LOCATION_AS_CONNECTION_ENDPOINT_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (useAnchorLocationAsConnectionEndpoint: ");
result.append(useAnchorLocationAsConnectionEndpoint);
result.append(')');
return result.toString();
}
} //AdvancedAnchorImpl