diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java new file mode 100644 index 0000000000..52a535f828 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.gmf.notation/src/org/eclipse/emf/cdo/gmf/notation/impl/IntValueStyleImpl.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Copyright (c) 2007 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.ecore.EClass; + +import org.eclipse.gmf.runtime.notation.IntValueStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Int Value Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.emf.cdo.gmf.notation.impl.IntValueStyleImpl#getIntValue <em>Int Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntValueStyleImpl extends NamedStyleImpl implements IntValueStyle +{ + /** + * The default value of the '{@link #getIntValue() <em>Int Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIntValue() + * @generated + * @ordered + */ + protected static final int INT_VALUE_EDEFAULT = 0; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IntValueStyleImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return NotationPackage.Literals.INT_VALUE_STYLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getIntValue() + { + return ((Integer)eDynamicGet(NotationPackage.INT_VALUE_STYLE__INT_VALUE, NotationPackage.Literals.INT_VALUE_STYLE__INT_VALUE, true, true)).intValue(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIntValue(int newIntValue) + { + eDynamicSet(NotationPackage.INT_VALUE_STYLE__INT_VALUE, NotationPackage.Literals.INT_VALUE_STYLE__INT_VALUE, new Integer(newIntValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + return getName(); + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + return new Integer(getIntValue()); + } + return eDynamicGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + setName((String)newValue); + return; + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + setIntValue(((Integer)newValue).intValue()); + return; + } + eDynamicSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + setName(NAME_EDEFAULT); + return; + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + setIntValue(INT_VALUE_EDEFAULT); + return; + } + eDynamicUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case NotationPackage.INT_VALUE_STYLE__NAME: + return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName()); + case NotationPackage.INT_VALUE_STYLE__INT_VALUE: + return getIntValue() != INT_VALUE_EDEFAULT; + } + return eDynamicIsSet(featureID); + } + +} // IntValueStyleImpl |