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

org.eclipse.bpmn2.di.impl.BPMNLabelStyleImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 * 
 * 
 * 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.bpmn2.di.impl;

import com.google.gwt.user.client.rpc.GwtTransient;

import org.eclipse.bpmn2.di.BPMNLabelStyle;
import org.eclipse.bpmn2.di.BpmnDiPackage;

import org.eclipse.dd.dc.Font;

import org.eclipse.dd.di.impl.StyleImpl;

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;

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

* The following features are implemented: *

*
    *
  • {@link org.eclipse.bpmn2.di.impl.BPMNLabelStyleImpl#getFont Font}
  • *
* * @generated */ public class BPMNLabelStyleImpl extends StyleImpl implements BPMNLabelStyle { /** * The cached value of the '{@link #getFont() Font}' containment reference. * * * @see #getFont() * @generated * @ordered */ @GwtTransient protected Font font; /** * * * @generated */ protected BPMNLabelStyleImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return BpmnDiPackage.Literals.BPMN_LABEL_STYLE; } /** * * * @generated */ @Override public Font getFont() { return font; } /** * * * @generated */ public NotificationChain basicSetFont(Font newFont, NotificationChain msgs) { Font oldFont = font; font = newFont; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BpmnDiPackage.BPMN_LABEL_STYLE__FONT, oldFont, newFont); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setFont(Font newFont) { if (newFont != font) { NotificationChain msgs = null; if (font != null) msgs = ((InternalEObject) font).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpmnDiPackage.BPMN_LABEL_STYLE__FONT, null, msgs); if (newFont != null) msgs = ((InternalEObject) newFont).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - BpmnDiPackage.BPMN_LABEL_STYLE__FONT, null, msgs); msgs = basicSetFont(newFont, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpmnDiPackage.BPMN_LABEL_STYLE__FONT, newFont, newFont)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL_STYLE__FONT: return basicSetFont(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL_STYLE__FONT: return getFont(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL_STYLE__FONT: setFont((Font) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL_STYLE__FONT: setFont((Font) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case BpmnDiPackage.BPMN_LABEL_STYLE__FONT: return font != null; } return super.eIsSet(featureID); } } //BPMNLabelStyleImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy