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

org.eclipse.ui.activities.ActivityEvent Maven / Gradle / Ivy

Go to download

This plug-in contains the bulk of the Workbench implementation, and depends on JFace, SWT, and Core Runtime. It cannot be used independently from org.eclipse.ui. Workbench client plug-ins should not depend directly on this plug-in.

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * 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:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.ui.activities;

/**
 * An instance of this class describes changes to an instance of 
 * IActivity.  This class does not give details as to the 
 * specifics of a change, only that the given property on the source object has 
 * changed.
 * 

* This class is not intended to be extended by clients. *

* * @since 3.0 * @see IActivityListener#activityChanged(ActivityEvent) */ public final class ActivityEvent { private IActivity activity; private boolean activityRequirementBindingsChanged; private boolean activityPatternBindingsChanged; private boolean definedChanged; private boolean enabledChanged; private boolean defaultEnabledChanged; private boolean nameChanged; private boolean descriptionChanged; /** * Creates a new instance of this class. Since 3.1 this method will assume * that the default enabled state has not changed. * * @param activity * the instance of the interface that changed. * @param activityRequirementBindingsChanged * true, iff the activityRequirementBindings * property changed. * @param activityPatternBindingsChanged * true, iff the activityPatternBindings property * changed. * @param definedChanged * true, iff the defined property changed. * @param descriptionChanged * true, iff the description property changed. * @param enabledChanged * true, iff the enabled property changed. * @param nameChanged * true, iff the name property changed. */ public ActivityEvent(IActivity activity, boolean activityRequirementBindingsChanged, boolean activityPatternBindingsChanged, boolean definedChanged, boolean descriptionChanged, boolean enabledChanged, boolean nameChanged) { this(activity, activityRequirementBindingsChanged, activityPatternBindingsChanged, definedChanged, descriptionChanged, enabledChanged, nameChanged, false); } /** * Creates a new instance of this class. * * @param activity * the instance of the interface that changed. * @param activityRequirementBindingsChanged * true, iff the activityRequirementBindings property changed. * @param activityPatternBindingsChanged * true, iff the activityPatternBindings property changed. * @param definedChanged * true, iff the defined property changed. * @param descriptionChanged * true, iff the description property changed. * @param enabledChanged * true, iff the enabled property changed. * @param nameChanged * true, iff the name property changed. * @param defaultEnabledChanged * true, iff the default enabled property changed. * @since 3.1 */ public ActivityEvent(IActivity activity, boolean activityRequirementBindingsChanged, boolean activityPatternBindingsChanged, boolean definedChanged, boolean descriptionChanged, boolean enabledChanged, boolean nameChanged, boolean defaultEnabledChanged) { if (activity == null) { throw new NullPointerException(); } this.activity = activity; this.activityRequirementBindingsChanged = activityRequirementBindingsChanged; this.activityPatternBindingsChanged = activityPatternBindingsChanged; this.definedChanged = definedChanged; this.enabledChanged = enabledChanged; this.nameChanged = nameChanged; this.descriptionChanged = descriptionChanged; this.defaultEnabledChanged = defaultEnabledChanged; } /** * Returns the instance of the interface that changed. * * @return the instance of the interface that changed. Guaranteed not to be * null. */ public IActivity getActivity() { return activity; } /** * Returns whether or not the defined property changed. * * @return true, iff the defined property changed. */ public boolean hasDefinedChanged() { return definedChanged; } /** * Returns whether or not the enabled property changed. * * @return true, iff the enabled property changed. */ public boolean hasEnabledChanged() { return enabledChanged; } /** * Returns whether or not the default enabled property changed. * * @return true, iff the default enabled property changed. * @since 3.1 */ public boolean hasDefaultEnabledChanged() { return defaultEnabledChanged; } /** * Returns whether or not the name property changed. * * @return true, iff the name property changed. */ public boolean hasNameChanged() { return nameChanged; } /** * Returns whether or not the description property changed. * * @return true, iff the description property changed. */ public boolean hasDescriptionChanged() { return descriptionChanged; } /** * Returns whether or not the activityRequirementBindings property changed. * * @return true, iff the activityRequirementBindings property changed. */ public boolean haveActivityRequirementBindingsChanged() { return activityRequirementBindingsChanged; } /** * Returns whether or not the activityPatternBindings property changed. * * @return true, iff the activityPatternBindings property changed. */ public boolean haveActivityPatternBindingsChanged() { return activityPatternBindingsChanged; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy