⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optionsimpl.java

📁 lumaQQ的源文件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/**
 * <copyright>
 * </copyright>
 *
 * $Id: OptionsImpl.java 1 2006-06-12 17:37:42Z sxp $
 */
package edu.tsinghua.lumaqq.ecore.option.impl;

import edu.tsinghua.lumaqq.ecore.LoginOption;

import edu.tsinghua.lumaqq.ecore.option.GUIOption;
import edu.tsinghua.lumaqq.ecore.option.KeyOption;
import edu.tsinghua.lumaqq.ecore.option.MessageOption;
import edu.tsinghua.lumaqq.ecore.option.OptionPackage;
import edu.tsinghua.lumaqq.ecore.option.Options;
import edu.tsinghua.lumaqq.ecore.option.OtherOption;
import edu.tsinghua.lumaqq.ecore.option.SyncOption;

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;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Options</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getLoginOption <em>Login Option</em>}</li>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getGuiOption <em>Gui Option</em>}</li>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getMessageOption <em>Message Option</em>}</li>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getOtherOption <em>Other Option</em>}</li>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getSyncOption <em>Sync Option</em>}</li>
 *   <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.OptionsImpl#getKeyOption <em>Key Option</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class OptionsImpl extends EObjectImpl implements Options {
	/**
	 * The cached value of the '{@link #getLoginOption() <em>Login Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLoginOption()
	 * @generated
	 * @ordered
	 */
	protected LoginOption loginOption = null;

	/**
	 * The cached value of the '{@link #getGuiOption() <em>Gui Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getGuiOption()
	 * @generated
	 * @ordered
	 */
	protected GUIOption guiOption = null;

	/**
	 * The cached value of the '{@link #getMessageOption() <em>Message Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMessageOption()
	 * @generated
	 * @ordered
	 */
	protected MessageOption messageOption = null;

	/**
	 * The cached value of the '{@link #getOtherOption() <em>Other Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOtherOption()
	 * @generated
	 * @ordered
	 */
	protected OtherOption otherOption = null;

	/**
	 * The cached value of the '{@link #getSyncOption() <em>Sync Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSyncOption()
	 * @generated
	 * @ordered
	 */
	protected SyncOption syncOption = null;

	/**
	 * The cached value of the '{@link #getKeyOption() <em>Key Option</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getKeyOption()
	 * @generated
	 * @ordered
	 */
	protected KeyOption keyOption = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected OptionsImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EClass eStaticClass() {
		return OptionPackage.Literals.OPTIONS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LoginOption getLoginOption() {
		return loginOption;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetLoginOption(LoginOption newLoginOption, NotificationChain msgs) {
		LoginOption oldLoginOption = loginOption;
		loginOption = newLoginOption;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__LOGIN_OPTION, oldLoginOption, newLoginOption);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLoginOption(LoginOption newLoginOption) {
		if (newLoginOption != loginOption) {
			NotificationChain msgs = null;
			if (loginOption != null)
				msgs = ((InternalEObject)loginOption).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__LOGIN_OPTION, null, msgs);
			if (newLoginOption != null)
				msgs = ((InternalEObject)newLoginOption).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__LOGIN_OPTION, null, msgs);
			msgs = basicSetLoginOption(newLoginOption, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__LOGIN_OPTION, newLoginOption, newLoginOption));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public GUIOption getGuiOption() {
		return guiOption;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetGuiOption(GUIOption newGuiOption, NotificationChain msgs) {
		GUIOption oldGuiOption = guiOption;
		guiOption = newGuiOption;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__GUI_OPTION, oldGuiOption, newGuiOption);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setGuiOption(GUIOption newGuiOption) {
		if (newGuiOption != guiOption) {
			NotificationChain msgs = null;
			if (guiOption != null)
				msgs = ((InternalEObject)guiOption).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__GUI_OPTION, null, msgs);
			if (newGuiOption != null)
				msgs = ((InternalEObject)newGuiOption).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__GUI_OPTION, null, msgs);
			msgs = basicSetGuiOption(newGuiOption, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__GUI_OPTION, newGuiOption, newGuiOption));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MessageOption getMessageOption() {
		return messageOption;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetMessageOption(MessageOption newMessageOption, NotificationChain msgs) {
		MessageOption oldMessageOption = messageOption;
		messageOption = newMessageOption;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__MESSAGE_OPTION, oldMessageOption, newMessageOption);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setMessageOption(MessageOption newMessageOption) {
		if (newMessageOption != messageOption) {
			NotificationChain msgs = null;
			if (messageOption != null)
				msgs = ((InternalEObject)messageOption).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__MESSAGE_OPTION, null, msgs);
			if (newMessageOption != null)
				msgs = ((InternalEObject)newMessageOption).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OptionPackage.OPTIONS__MESSAGE_OPTION, null, msgs);
			msgs = basicSetMessageOption(newMessageOption, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, OptionPackage.OPTIONS__MESSAGE_OPTION, newMessageOption, newMessageOption));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -