01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.activities;
11:
12: /**
13: * An instance of this class describes changes to an instance of
14: * <code>IIdentifier</code>. This class does not give details as to the
15: * specifics of a change, only that the given property on the source object has
16: * changed.
17: *
18: * <p>
19: * This class is not intended to be extended by clients.
20: * </p>
21: *
22: * @since 3.0
23: * @see IIdentifierListener#identifierChanged(IdentifierEvent)
24: */
25: public final class IdentifierEvent {
26: private boolean activityIdsChanged;
27:
28: private boolean enabledChanged;
29:
30: private IIdentifier identifier;
31:
32: /**
33: * Creates a new instance of this class.
34: *
35: * @param identifier
36: * the instance of the interface that changed.
37: * @param activityIdsChanged
38: * <code>true</code>, iff the activityIds property changed.
39: * @param enabledChanged
40: * <code>true</code>, iff the enabled property changed.
41: */
42: public IdentifierEvent(IIdentifier identifier,
43: boolean activityIdsChanged, boolean enabledChanged) {
44: if (identifier == null) {
45: throw new NullPointerException();
46: }
47:
48: this .identifier = identifier;
49: this .activityIdsChanged = activityIdsChanged;
50: this .enabledChanged = enabledChanged;
51: }
52:
53: /**
54: * Returns the instance of the interface that changed.
55: *
56: * @return the instance of the interface that changed. Guaranteed not to be
57: * <code>null</code>.
58: */
59: public IIdentifier getIdentifier() {
60: return identifier;
61: }
62:
63: /**
64: * Returns whether or not the activityIds property changed.
65: *
66: * @return <code>true</code>, iff the activityIds property changed.
67: */
68: public boolean hasActivityIdsChanged() {
69: return activityIdsChanged;
70: }
71:
72: /**
73: * Returns whether or not the enabled property changed.
74: *
75: * @return <code>true</code>, iff the enabled property changed.
76: */
77: public boolean hasEnabledChanged() {
78: return enabledChanged;
79: }
80: }
|