All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.omg.bpmn.di.impl.BPMNLabelImpl Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2012 - 2024 Data In Motion and others.
 * All rights reserved. 
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *      Mark Hoffmann - initial API and implementation
 */
package org.omg.bpmn.di.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.omg.bpmn.di.BPMNLabel;
import org.omg.bpmn.di.BPMNLabelStyle;
import org.omg.bpmn.di.BpmnDiPackage;

import org.omg.dd.di.impl.LabelImpl;

/**
 * 
 * An implementation of the model object 'BPMN Label'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.di.impl.BPMNLabelImpl#getLabelStyle Label Style}
  • *
* * @generated */ public class BPMNLabelImpl extends LabelImpl implements BPMNLabel { /** * The cached value of the '{@link #getLabelStyle() Label Style}' reference. * * * @see #getLabelStyle() * @generated * @ordered */ protected BPMNLabelStyle labelStyle; /** * * * @generated */ protected BPMNLabelImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return BpmnDiPackage.Literals.BPMN_LABEL; } /** * * * @generated */ @Override public BPMNLabelStyle getLabelStyle() { if (labelStyle != null && labelStyle.eIsProxy()) { InternalEObject oldLabelStyle = (InternalEObject)labelStyle; labelStyle = (BPMNLabelStyle)eResolveProxy(oldLabelStyle); if (labelStyle != oldLabelStyle) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, BpmnDiPackage.BPMN_LABEL__LABEL_STYLE, oldLabelStyle, labelStyle)); } } return labelStyle; } /** * * * @generated */ public BPMNLabelStyle basicGetLabelStyle() { return labelStyle; } /** * * * @generated */ @Override public void setLabelStyle(BPMNLabelStyle newLabelStyle) { BPMNLabelStyle oldLabelStyle = labelStyle; labelStyle = newLabelStyle; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpmnDiPackage.BPMN_LABEL__LABEL_STYLE, oldLabelStyle, labelStyle)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL__LABEL_STYLE: if (resolve) return getLabelStyle(); return basicGetLabelStyle(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL__LABEL_STYLE: setLabelStyle((BPMNLabelStyle)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL__LABEL_STYLE: setLabelStyle((BPMNLabelStyle)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL__LABEL_STYLE: return labelStyle != null; } return super.eIsSet(featureID); } } //BPMNLabelImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy