diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java new file mode 100644 index 0000000000..f69757e014 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/GuideStyleImpl.java @@ -0,0 +1,194 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + ****************************************************************************/ + +package org.eclipse.emf.cdo.gmf.notation.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.gmf.runtime.notation.GuideStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +import java.util.Collection; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Guide Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideStyleImpl#getHorizontalGuides <em>Horizontal Guides</em>}</li> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.GuideStyleImpl#getVerticalGuides <em>Vertical Guides</em>}</li> + * </ul> + * + * @generated + */ +/* + * @canBeSeenBy org.eclipse.gmf.runtime.notation.* + */ +public class GuideStyleImpl extends CDOObjectImpl implements GuideStyle +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected GuideStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.GUIDE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getHorizontalGuides() + { + return (EList)eDynamicGet(NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__HORIZONTAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getVerticalGuides() + { + return (EList)eDynamicGet(NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES, NotationPackage.Literals.GUIDE_STYLE__VERTICAL_GUIDES, true, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); + } + return eDynamicInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return getHorizontalGuides(); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return getVerticalGuides(); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + getHorizontalGuides().addAll((Collection)newValue); + return; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + getVerticalGuides().addAll((Collection)newValue); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + getHorizontalGuides().clear(); + return; + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + getVerticalGuides().clear(); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.GUIDE_STYLE__HORIZONTAL_GUIDES: + return !getHorizontalGuides().isEmpty(); + case NotationPackage.GUIDE_STYLE__VERTICAL_GUIDES: + return !getVerticalGuides().isEmpty(); + } + return eDynamicIsSet(featureID); + } + +} // GuideStyleImpl |