org.eclipse.dd.dc.impl.PointImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* Copyright (c) 2010 SAP AG.
* 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:
* Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
*
*
*/
package org.eclipse.dd.dc.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.dd.dc.DcPackage;
import org.eclipse.dd.dc.Point;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
*
* An implementation of the model object 'Point'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.dd.dc.impl.PointImpl#getX X}
* - {@link org.eclipse.dd.dc.impl.PointImpl#getY Y}
*
*
* @generated
*/
public class PointImpl extends EObjectImpl implements Point {
/**
* The default value of the '{@link #getX() X}' attribute.
*
*
* @see #getX()
* @generated
* @ordered
*/
protected static final float X_EDEFAULT = 0.0F;
/**
* The cached value of the '{@link #getX() X}' attribute.
*
*
* @see #getX()
* @generated
* @ordered
*/
@GwtTransient
protected float x = X_EDEFAULT;
/**
* The default value of the '{@link #getY() Y}' attribute.
*
*
* @see #getY()
* @generated
* @ordered
*/
protected static final float Y_EDEFAULT = 0.0F;
/**
* The cached value of the '{@link #getY() Y}' attribute.
*
*
* @see #getY()
* @generated
* @ordered
*/
@GwtTransient
protected float y = Y_EDEFAULT;
/**
*
*
* @generated
*/
protected PointImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DcPackage.Literals.POINT;
}
/**
*
*
* @generated
*/
@Override
public float getX() {
return x;
}
/**
*
*
* @generated
*/
@Override
public void setX(float newX) {
float oldX = x;
x = newX;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DcPackage.POINT__X, oldX, x));
}
/**
*
*
* @generated
*/
@Override
public float getY() {
return y;
}
/**
*
*
* @generated
*/
@Override
public void setY(float newY) {
float oldY = y;
y = newY;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DcPackage.POINT__Y, oldY, y));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DcPackage.POINT__X:
return getX();
case DcPackage.POINT__Y:
return getY();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DcPackage.POINT__X:
setX((Float) newValue);
return;
case DcPackage.POINT__Y:
setY((Float) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DcPackage.POINT__X:
setX(X_EDEFAULT);
return;
case DcPackage.POINT__Y:
setY(Y_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DcPackage.POINT__X:
return x != X_EDEFAULT;
case DcPackage.POINT__Y:
return y != Y_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (x: ");
result.append(x);
result.append(", y: ");
result.append(y);
result.append(')');
return result.toString();
}
} //PointImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy