| /** |
| * 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 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.reportdsl.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.reportdsl.Color; |
| import org.eclipse.osbp.xtext.reportdsl.ReportDSLPackage; |
| import org.eclipse.osbp.xtext.reportdsl.TableCellColor; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Table Cell Color</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.reportdsl.impl.TableCellColorImpl#getColor <em>Color</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class TableCellColorImpl extends ReportLazyResolverImpl implements TableCellColor { |
| /** |
| * The cached value of the '{@link #getColor() <em>Color</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColor() |
| * @generated |
| * @ordered |
| */ |
| protected Color color; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TableCellColorImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ReportDSLPackage.Literals.TABLE_CELL_COLOR; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Color getColor() { |
| if (color != null && color.eIsProxy()) { |
| InternalEObject oldColor = (InternalEObject)color; |
| color = (Color)eResolveProxy(oldColor); |
| if (color != oldColor) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, ReportDSLPackage.TABLE_CELL_COLOR__COLOR, oldColor, color)); |
| } |
| } |
| return color; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Color basicGetColor() { |
| return color; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setColor(Color newColor) { |
| Color oldColor = color; |
| color = newColor; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ReportDSLPackage.TABLE_CELL_COLOR__COLOR, oldColor, color)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ReportDSLPackage.TABLE_CELL_COLOR__COLOR: |
| if (resolve) return getColor(); |
| return basicGetColor(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ReportDSLPackage.TABLE_CELL_COLOR__COLOR: |
| setColor((Color)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ReportDSLPackage.TABLE_CELL_COLOR__COLOR: |
| setColor((Color)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ReportDSLPackage.TABLE_CELL_COLOR__COLOR: |
| return color != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //TableCellColorImpl |