/** * Copyright (c) 2013 CEA LIST. * * * 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: * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation */ package org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.EModelElementImpl; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage; import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration; /** * * An implementation of the model object 'Object Label Provider Configuration'. * *

* The following features are implemented: *

*

* * @generated */ public class ObjectLabelProviderConfigurationImpl extends EModelElementImpl implements ObjectLabelProviderConfiguration { /** * The default value of the '{@link #isDisplayIcon() Display Icon}' attribute. * * * * @see #isDisplayIcon() * @generated * @ordered */ protected static final boolean DISPLAY_ICON_EDEFAULT = true; /** * The cached value of the '{@link #isDisplayIcon() Display Icon}' attribute. * * * * @see #isDisplayIcon() * @generated * @ordered */ protected boolean displayIcon = DISPLAY_ICON_EDEFAULT; /** * The default value of the '{@link #isDisplayLabel() Display Label}' attribute. * * * * @see #isDisplayLabel() * @generated * @ordered */ protected static final boolean DISPLAY_LABEL_EDEFAULT = true; /** * The cached value of the '{@link #isDisplayLabel() Display Label}' attribute. * * * * @see #isDisplayLabel() * @generated * @ordered */ protected boolean displayLabel = DISPLAY_LABEL_EDEFAULT; /** * * * * @generated */ protected ObjectLabelProviderConfigurationImpl() { super(); } /** * * * * @generated */ @Override protected EClass eStaticClass() { return NattablelabelproviderPackage.Literals.OBJECT_LABEL_PROVIDER_CONFIGURATION; } /** * * * * @generated */ public boolean isDisplayIcon() { return displayIcon; } /** * * * * @generated */ public void setDisplayIcon(boolean newDisplayIcon) { boolean oldDisplayIcon = displayIcon; displayIcon = newDisplayIcon; if(eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON, oldDisplayIcon, displayIcon)); } /** * * * * @generated */ public boolean isDisplayLabel() { return displayLabel; } /** * * * * @generated */ public void setDisplayLabel(boolean newDisplayLabel) { boolean oldDisplayLabel = displayLabel; displayLabel = newDisplayLabel; if(eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL, oldDisplayLabel, displayLabel)); } /** * * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch(featureID) { case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON: return isDisplayIcon(); case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL: return isDisplayLabel(); } return super.eGet(featureID, resolve, coreType); } /** * * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch(featureID) { case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON: setDisplayIcon((Boolean)newValue); return; case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL: setDisplayLabel((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * * @generated */ @Override public void eUnset(int featureID) { switch(featureID) { case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON: setDisplayIcon(DISPLAY_ICON_EDEFAULT); return; case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL: setDisplayLabel(DISPLAY_LABEL_EDEFAULT); return; } super.eUnset(featureID); } /** * * * * @generated */ @Override public boolean eIsSet(int featureID) { switch(featureID) { case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON: return displayIcon != DISPLAY_ICON_EDEFAULT; case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL: return displayLabel != DISPLAY_LABEL_EDEFAULT; } return super.eIsSet(featureID); } /** * * * * @generated */ @Override public String toString() { if(eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (displayIcon: "); //$NON-NLS-1$ result.append(displayIcon); result.append(", displayLabel: "); //$NON-NLS-1$ result.append(displayLabel); result.append(')'); return result.toString(); } } //ObjectLabelProviderConfigurationImpl