/******************************************************************************* | |
* Copyright (c) 2011, 2013 Formal Mind GmbH and University of Dusseldorf. | |
* 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: | |
* Michael Jastram - initial API and implementation | |
******************************************************************************/ | |
package org.eclipse.rmf.reqif10.pror.presentation.headline.impl; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.rmf.reqif10.pror.configuration.impl.ProrPresentationConfigurationImpl; | |
import org.eclipse.rmf.reqif10.pror.presentation.headline.HeadlineConfiguration; | |
import org.eclipse.rmf.reqif10.pror.presentation.headline.HeadlinePackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Configuration</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.rmf.reqif10.pror.presentation.headline.impl.HeadlineConfigurationImpl#getSize <em>Size</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class HeadlineConfigurationImpl extends ProrPresentationConfigurationImpl implements HeadlineConfiguration { | |
/** | |
* The default value of the '{@link #getSize() <em>Size</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getSize() | |
* @generated | |
* @ordered | |
*/ | |
protected static final int SIZE_EDEFAULT = 14; | |
/** | |
* The cached value of the '{@link #getSize() <em>Size</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getSize() | |
* @generated | |
* @ordered | |
*/ | |
protected int size = SIZE_EDEFAULT; | |
/** | |
* This is true if the Size attribute has been set. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
* @ordered | |
*/ | |
protected boolean sizeESet; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected HeadlineConfigurationImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return HeadlinePackage.Literals.HEADLINE_CONFIGURATION; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public int getSize() { | |
return size; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setSize(int newSize) { | |
int oldSize = size; | |
size = newSize; | |
boolean oldSizeESet = sizeESet; | |
sizeESet = true; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, HeadlinePackage.HEADLINE_CONFIGURATION__SIZE, oldSize, size, !oldSizeESet)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void unsetSize() { | |
int oldSize = size; | |
boolean oldSizeESet = sizeESet; | |
size = SIZE_EDEFAULT; | |
sizeESet = false; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.UNSET, HeadlinePackage.HEADLINE_CONFIGURATION__SIZE, oldSize, SIZE_EDEFAULT, oldSizeESet)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public boolean isSetSize() { | |
return sizeESet; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case HeadlinePackage.HEADLINE_CONFIGURATION__SIZE: | |
return getSize(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case HeadlinePackage.HEADLINE_CONFIGURATION__SIZE: | |
setSize((Integer)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case HeadlinePackage.HEADLINE_CONFIGURATION__SIZE: | |
unsetSize(); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case HeadlinePackage.HEADLINE_CONFIGURATION__SIZE: | |
return isSetSize(); | |
} | |
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(" (size: "); | |
if (sizeESet) result.append(size); else result.append("<unset>"); | |
result.append(')'); | |
return result.toString(); | |
} | |
} //HeadlineConfigurationImpl |