| /** |
| * 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: |
| * Joerg Riegel - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.chart.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.chart.ChartBubble; |
| import org.eclipse.osbp.xtext.chart.ChartDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Chart Bubble</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.chart.impl.ChartBubbleImpl#isMultiplier <em>Multiplier</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.chart.impl.ChartBubbleImpl#getMultiplierValue <em>Multiplier Value</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.chart.impl.ChartBubbleImpl#isGradient <em>Gradient</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.chart.impl.ChartBubbleImpl#isTransparent <em>Transparent</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ChartBubbleImpl extends ChartLazyResolverImpl implements ChartBubble { |
| /** |
| * The default value of the '{@link #isMultiplier() <em>Multiplier</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isMultiplier() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean MULTIPLIER_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isMultiplier() <em>Multiplier</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isMultiplier() |
| * @generated |
| * @ordered |
| */ |
| protected boolean multiplier = MULTIPLIER_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getMultiplierValue() <em>Multiplier Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMultiplierValue() |
| * @generated |
| * @ordered |
| */ |
| protected static final String MULTIPLIER_VALUE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMultiplierValue() <em>Multiplier Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMultiplierValue() |
| * @generated |
| * @ordered |
| */ |
| protected String multiplierValue = MULTIPLIER_VALUE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isGradient() <em>Gradient</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isGradient() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean GRADIENT_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isGradient() <em>Gradient</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isGradient() |
| * @generated |
| * @ordered |
| */ |
| protected boolean gradient = GRADIENT_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isTransparent() <em>Transparent</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isTransparent() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean TRANSPARENT_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isTransparent() <em>Transparent</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isTransparent() |
| * @generated |
| * @ordered |
| */ |
| protected boolean transparent = TRANSPARENT_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ChartBubbleImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ChartDSLPackage.Literals.CHART_BUBBLE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isMultiplier() { |
| return multiplier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMultiplier(boolean newMultiplier) { |
| boolean oldMultiplier = multiplier; |
| multiplier = newMultiplier; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ChartDSLPackage.CHART_BUBBLE__MULTIPLIER, oldMultiplier, multiplier)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getMultiplierValue() { |
| return multiplierValue; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMultiplierValue(String newMultiplierValue) { |
| String oldMultiplierValue = multiplierValue; |
| multiplierValue = newMultiplierValue; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ChartDSLPackage.CHART_BUBBLE__MULTIPLIER_VALUE, oldMultiplierValue, multiplierValue)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isGradient() { |
| return gradient; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setGradient(boolean newGradient) { |
| boolean oldGradient = gradient; |
| gradient = newGradient; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ChartDSLPackage.CHART_BUBBLE__GRADIENT, oldGradient, gradient)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isTransparent() { |
| return transparent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setTransparent(boolean newTransparent) { |
| boolean oldTransparent = transparent; |
| transparent = newTransparent; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ChartDSLPackage.CHART_BUBBLE__TRANSPARENT, oldTransparent, transparent)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER: |
| return isMultiplier(); |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER_VALUE: |
| return getMultiplierValue(); |
| case ChartDSLPackage.CHART_BUBBLE__GRADIENT: |
| return isGradient(); |
| case ChartDSLPackage.CHART_BUBBLE__TRANSPARENT: |
| return isTransparent(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER: |
| setMultiplier((Boolean)newValue); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER_VALUE: |
| setMultiplierValue((String)newValue); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__GRADIENT: |
| setGradient((Boolean)newValue); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__TRANSPARENT: |
| setTransparent((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER: |
| setMultiplier(MULTIPLIER_EDEFAULT); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER_VALUE: |
| setMultiplierValue(MULTIPLIER_VALUE_EDEFAULT); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__GRADIENT: |
| setGradient(GRADIENT_EDEFAULT); |
| return; |
| case ChartDSLPackage.CHART_BUBBLE__TRANSPARENT: |
| setTransparent(TRANSPARENT_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER: |
| return multiplier != MULTIPLIER_EDEFAULT; |
| case ChartDSLPackage.CHART_BUBBLE__MULTIPLIER_VALUE: |
| return MULTIPLIER_VALUE_EDEFAULT == null ? multiplierValue != null : !MULTIPLIER_VALUE_EDEFAULT.equals(multiplierValue); |
| case ChartDSLPackage.CHART_BUBBLE__GRADIENT: |
| return gradient != GRADIENT_EDEFAULT; |
| case ChartDSLPackage.CHART_BUBBLE__TRANSPARENT: |
| return transparent != TRANSPARENT_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(" (multiplier: "); |
| result.append(multiplier); |
| result.append(", multiplierValue: "); |
| result.append(multiplierValue); |
| result.append(", gradient: "); |
| result.append(gradient); |
| result.append(", transparent: "); |
| result.append(transparent); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ChartBubbleImpl |