summaryrefslogtreecommitdiffstats
path: root/rba.model.view/src/rba/view/impl/OffsetImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'rba.model.view/src/rba/view/impl/OffsetImpl.java')
-rw-r--r--rba.model.view/src/rba/view/impl/OffsetImpl.java355
1 files changed, 355 insertions, 0 deletions
diff --git a/rba.model.view/src/rba/view/impl/OffsetImpl.java b/rba.model.view/src/rba/view/impl/OffsetImpl.java
new file mode 100644
index 0000000..5a5575d
--- /dev/null
+++ b/rba.model.view/src/rba/view/impl/OffsetImpl.java
@@ -0,0 +1,355 @@
+/**
+ */
+package rba.view.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 rba.core.impl.PackagableElementImpl;
+
+import rba.view.Offset;
+import rba.view.RBAViewPackage;
+import rba.view.SizeReference;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Offset</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link rba.view.impl.OffsetImpl#getX <em>X</em>}</li>
+ * <li>{@link rba.view.impl.OffsetImpl#getY <em>Y</em>}</li>
+ * <li>{@link rba.view.impl.OffsetImpl#getSize <em>Size</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class OffsetImpl extends PackagableElementImpl implements Offset {
+ /**
+ * The default value of the '{@link #getX() <em>X</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getX()
+ * @generated
+ * @ordered
+ */
+ protected static final int X_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getX() <em>X</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getX()
+ * @generated
+ * @ordered
+ */
+ protected int x = X_EDEFAULT;
+
+ /**
+ * This is true if the X attribute has been set.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean xESet;
+
+ /**
+ * The default value of the '{@link #getY() <em>Y</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getY()
+ * @generated
+ * @ordered
+ */
+ protected static final int Y_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getY() <em>Y</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getY()
+ * @generated
+ * @ordered
+ */
+ protected int y = Y_EDEFAULT;
+
+ /**
+ * This is true if the Y attribute has been set.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean yESet;
+
+ /**
+ * The cached value of the '{@link #getSize() <em>Size</em>}' containment reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getSize()
+ * @generated
+ * @ordered
+ */
+ protected SizeReference size;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected OffsetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RBAViewPackage.Literals.OFFSET;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getX() {
+ return x;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setX(int newX) {
+ int oldX = x;
+ x = newX;
+ boolean oldXESet = xESet;
+ xESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__X, oldX, x, !oldXESet));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetX() {
+ int oldX = x;
+ boolean oldXESet = xESet;
+ x = X_EDEFAULT;
+ xESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.OFFSET__X, oldX, X_EDEFAULT,
+ oldXESet));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetX() {
+ return xESet;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getY() {
+ return y;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setY(int newY) {
+ int oldY = y;
+ y = newY;
+ boolean oldYESet = yESet;
+ yESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__Y, oldY, y, !oldYESet));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetY() {
+ int oldY = y;
+ boolean oldYESet = yESet;
+ y = Y_EDEFAULT;
+ yESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.OFFSET__Y, oldY, Y_EDEFAULT,
+ oldYESet));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetY() {
+ return yESet;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public SizeReference getSize() {
+ return size;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSize(SizeReference newSize, NotificationChain msgs) {
+ SizeReference oldSize = size;
+ size = newSize;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__SIZE,
+ oldSize, newSize);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSize(SizeReference newSize) {
+ if (newSize != size) {
+ NotificationChain msgs = null;
+ if (size != null)
+ msgs = ((InternalEObject) size).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE - RBAViewPackage.OFFSET__SIZE, null, msgs);
+ if (newSize != null)
+ msgs = ((InternalEObject) newSize).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE - RBAViewPackage.OFFSET__SIZE, null, msgs);
+ msgs = basicSetSize(newSize, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.OFFSET__SIZE, newSize, newSize));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RBAViewPackage.OFFSET__SIZE:
+ return basicSetSize(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 RBAViewPackage.OFFSET__X:
+ return getX();
+ case RBAViewPackage.OFFSET__Y:
+ return getY();
+ case RBAViewPackage.OFFSET__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 RBAViewPackage.OFFSET__X:
+ setX((Integer) newValue);
+ return;
+ case RBAViewPackage.OFFSET__Y:
+ setY((Integer) newValue);
+ return;
+ case RBAViewPackage.OFFSET__SIZE:
+ setSize((SizeReference) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RBAViewPackage.OFFSET__X:
+ unsetX();
+ return;
+ case RBAViewPackage.OFFSET__Y:
+ unsetY();
+ return;
+ case RBAViewPackage.OFFSET__SIZE:
+ setSize((SizeReference) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RBAViewPackage.OFFSET__X:
+ return isSetX();
+ case RBAViewPackage.OFFSET__Y:
+ return isSetY();
+ case RBAViewPackage.OFFSET__SIZE:
+ return size != null;
+ }
+ 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(" (x: ");
+ if (xESet)
+ result.append(x);
+ else
+ result.append("<unset>");
+ result.append(", y: ");
+ if (yESet)
+ result.append(y);
+ else
+ result.append("<unset>");
+ result.append(')');
+ return result.toString();
+ }
+
+} // OffsetImpl