/** * <copyright> * </copyright> * * $Id: SplitPaneImpl.java,v 1.2 2009/10/23 12:40:31 htraetteb Exp $ */ package org.eclipse.e4.tm.widgets.impl; import org.eclipse.e4.tm.widgets.Control; import org.eclipse.e4.tm.widgets.SplitPane; import org.eclipse.e4.tm.widgets.WidgetsPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Split Pane</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.e4.tm.widgets.impl.SplitPaneImpl#getOrientation <em>Orientation</em>}</li> * </ul> * </p> * * @generated */ public class SplitPaneImpl extends AbstractCompositeImpl<Control> implements SplitPane { /** * The default value of the '{@link #getOrientation() <em>Orientation</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOrientation() * @generated * @ordered */ protected static final String ORIENTATION_EDEFAULT = null; /** * The cached value of the '{@link #getOrientation() <em>Orientation</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOrientation() * @generated * @ordered */ protected String orientation = ORIENTATION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SplitPaneImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return WidgetsPackage.Literals.SPLIT_PANE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getOrientation() { return orientation; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setOrientation(String newOrientation) { String oldOrientation = orientation; orientation = newOrientation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, WidgetsPackage.SPLIT_PANE__ORIENTATION, oldOrientation, orientation)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case WidgetsPackage.SPLIT_PANE__ORIENTATION: return getOrientation(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case WidgetsPackage.SPLIT_PANE__ORIENTATION: setOrientation((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case WidgetsPackage.SPLIT_PANE__ORIENTATION: setOrientation(ORIENTATION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case WidgetsPackage.SPLIT_PANE__ORIENTATION: return ORIENTATION_EDEFAULT == null ? orientation != null : !ORIENTATION_EDEFAULT.equals(orientation); } 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(" (orientation: "); result.append(orientation); result.append(')'); return result.toString(); } } //SplitPaneImpl