From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- .../src/rba/view/impl/PositionContainerImpl.java | 443 +++++++++++++++++++++ 1 file changed, 443 insertions(+) create mode 100644 rba.model.view/src/rba/view/impl/PositionContainerImpl.java (limited to 'rba.model.view/src/rba/view/impl/PositionContainerImpl.java') diff --git a/rba.model.view/src/rba/view/impl/PositionContainerImpl.java b/rba.model.view/src/rba/view/impl/PositionContainerImpl.java new file mode 100644 index 0000000..0b313c9 --- /dev/null +++ b/rba.model.view/src/rba/view/impl/PositionContainerImpl.java @@ -0,0 +1,443 @@ +/** + */ +package rba.view.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import rba.view.Area; +import rba.view.BasePoint; +import rba.view.Offset; +import rba.view.PositionContainer; +import rba.view.RBAViewPackage; + +/** + * An implementation of the model object 'Position Container'. + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class PositionContainerImpl extends MinimalEObjectImpl.Container implements PositionContainer { + /** + * The default value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected static final int X_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getX() X}' attribute. + * + * @see #getX() + * @generated + * @ordered + */ + protected int x = X_EDEFAULT; + + /** + * This is true if the X attribute has been set. + * + * @generated + * @ordered + */ + protected boolean xESet; + + /** + * The default value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected static final int Y_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getY() Y}' attribute. + * + * @see #getY() + * @generated + * @ordered + */ + protected int y = Y_EDEFAULT; + + /** + * This is true if the Y attribute has been set. + * + * @generated + * @ordered + */ + protected boolean yESet; + + /** + * The default value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected static final BasePoint BASE_POINT_EDEFAULT = BasePoint.LEFT_TOP; + + /** + * The cached value of the '{@link #getBasePoint() Base Point}' attribute. + * + * @see #getBasePoint() + * @generated + * @ordered + */ + protected BasePoint basePoint = BASE_POINT_EDEFAULT; + + /** + * The cached value of the '{@link #getArea() Area}' reference. + * + * @see #getArea() + * @generated + * @ordered + */ + protected Area area; + + /** + * The cached value of the '{@link #getOffset() Offset}' containment reference list. + * + * @see #getOffset() + * @generated + * @ordered + */ + protected EList offset; + + /** + * + * @generated + */ + protected PositionContainerImpl() { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBAViewPackage.Literals.POSITION_CONTAINER; + } + + /** + * + * @generated + */ + public int getX() { + return x; + } + + /** + * + * @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.POSITION_CONTAINER__X, oldX, x, + !oldXESet)); + } + + /** + * + * @generated + */ + public void unsetX() { + int oldX = x; + boolean oldXESet = xESet; + x = X_EDEFAULT; + xESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.POSITION_CONTAINER__X, oldX, + X_EDEFAULT, oldXESet)); + } + + /** + * + * @generated + */ + public boolean isSetX() { + return xESet; + } + + /** + * + * @generated + */ + public int getY() { + return y; + } + + /** + * + * @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.POSITION_CONTAINER__Y, oldY, y, + !oldYESet)); + } + + /** + * + * @generated + */ + public void unsetY() { + int oldY = y; + boolean oldYESet = yESet; + y = Y_EDEFAULT; + yESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, RBAViewPackage.POSITION_CONTAINER__Y, oldY, + Y_EDEFAULT, oldYESet)); + } + + /** + * + * @generated + */ + public boolean isSetY() { + return yESet; + } + + /** + * + * @generated + */ + public BasePoint getBasePoint() { + return basePoint; + } + + /** + * + * @generated + */ + public void setBasePoint(BasePoint newBasePoint) { + BasePoint oldBasePoint = basePoint; + basePoint = newBasePoint == null ? BASE_POINT_EDEFAULT : newBasePoint; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__BASE_POINT, + oldBasePoint, basePoint)); + } + + /** + * + * @generated + */ + public Area getArea() { + if (area != null && area.eIsProxy()) { + InternalEObject oldArea = (InternalEObject) area; + area = (Area) eResolveProxy(oldArea); + if (area != oldArea) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, RBAViewPackage.POSITION_CONTAINER__AREA, + oldArea, area)); + } + } + return area; + } + + /** + * + * @generated + */ + public Area basicGetArea() { + return area; + } + + /** + * + * @generated + */ + public void setArea(Area newArea) { + Area oldArea = area; + area = newArea; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RBAViewPackage.POSITION_CONTAINER__AREA, oldArea, + area)); + } + + /** + * + * @generated + */ + public EList getOffset() { + if (offset == null) { + offset = new EObjectContainmentEList(Offset.class, this, RBAViewPackage.POSITION_CONTAINER__OFFSET); + } + return offset; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return ((InternalEList) getOffset()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + return getX(); + case RBAViewPackage.POSITION_CONTAINER__Y: + return getY(); + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + return getBasePoint(); + case RBAViewPackage.POSITION_CONTAINER__AREA: + if (resolve) + return getArea(); + return basicGetArea(); + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return getOffset(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + setX((Integer) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__Y: + setY((Integer) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + setBasePoint((BasePoint) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__AREA: + setArea((Area) newValue); + return; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + getOffset().clear(); + getOffset().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + unsetX(); + return; + case RBAViewPackage.POSITION_CONTAINER__Y: + unsetY(); + return; + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + setBasePoint(BASE_POINT_EDEFAULT); + return; + case RBAViewPackage.POSITION_CONTAINER__AREA: + setArea((Area) null); + return; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + getOffset().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBAViewPackage.POSITION_CONTAINER__X: + return isSetX(); + case RBAViewPackage.POSITION_CONTAINER__Y: + return isSetY(); + case RBAViewPackage.POSITION_CONTAINER__BASE_POINT: + return basePoint != BASE_POINT_EDEFAULT; + case RBAViewPackage.POSITION_CONTAINER__AREA: + return area != null; + case RBAViewPackage.POSITION_CONTAINER__OFFSET: + return offset != null && !offset.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @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(""); + result.append(", y: "); + if (yESet) + result.append(y); + else + result.append(""); + result.append(", basePoint: "); + result.append(basePoint); + result.append(')'); + return result.toString(); + } + +} // PositionContainerImpl -- cgit 1.2.3-korg