| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.infogrid.model.gridsource.style.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridNestedField; |
| import org.eclipse.osbp.infogrid.model.gridsource.style.CxGridPropSparklineStyle; |
| import org.eclipse.osbp.infogrid.model.gridsource.style.CxGridStylePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Cx Grid Prop Sparkline Style</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.infogrid.model.gridsource.style.impl.CxGridPropSparklineStyleImpl#getField <em>Field</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class CxGridPropSparklineStyleImpl extends CxGridPropStyleImpl implements CxGridPropSparklineStyle { |
| /** |
| * The cached value of the '{@link #getField() <em>Field</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getField() |
| * @generated |
| * @ordered |
| */ |
| protected CxGridNestedField field; |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CxGridPropSparklineStyleImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return CxGridStylePackage.Literals.CX_GRID_PROP_SPARKLINE_STYLE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CxGridNestedField getField() { |
| return field; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetField(CxGridNestedField newField, NotificationChain msgs) { |
| CxGridNestedField oldField = field; |
| field = newField; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD, oldField, newField); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setField(CxGridNestedField newField) { |
| if (newField != field) { |
| NotificationChain msgs = null; |
| if (field != null) |
| msgs = ((InternalEObject)field).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD, null, msgs); |
| if (newField != null) |
| msgs = ((InternalEObject)newField).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD, null, msgs); |
| msgs = basicSetField(newField, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD, newField, newField)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD: |
| return basicSetField(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD: |
| return getField(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD: |
| setField((CxGridNestedField)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD: |
| setField((CxGridNestedField)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_PROP_SPARKLINE_STYLE__FIELD: |
| return field != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //CxGridPropSparklineStyleImpl |