KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > activities > IdentifierEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.activities;
13
14 /**
15  * An instance of this class describes changes to an instance of
16  * <code>IIdentifier</code>. This class does not give details as to the
17  * specifics of a change, only that the given property on the source object has
18  * changed.
19  *
20  * <p>
21  * This class is not intended to be extended by clients.
22  * </p>
23  *
24  * @since 3.0
25  * @see IIdentifierListener#identifierChanged(IdentifierEvent)
26  */

27 public final class IdentifierEvent {
28     private boolean activityIdsChanged;
29
30     private boolean enabledChanged;
31
32     private IIdentifier identifier;
33
34     /**
35      * Creates a new instance of this class.
36      *
37      * @param identifier
38      * the instance of the interface that changed.
39      * @param activityIdsChanged
40      * <code>true</code>, iff the activityIds property changed.
41      * @param enabledChanged
42      * <code>true</code>, iff the enabled property changed.
43      */

44     public IdentifierEvent(IIdentifier identifier, boolean activityIdsChanged,
45             boolean enabledChanged) {
46         if (identifier == null) {
47             throw new NullPointerException JavaDoc();
48         }
49
50         this.identifier = identifier;
51         this.activityIdsChanged = activityIdsChanged;
52         this.enabledChanged = enabledChanged;
53     }
54
55     /**
56      * Returns the instance of the interface that changed.
57      *
58      * @return the instance of the interface that changed. Guaranteed not to be
59      * <code>null</code>.
60      */

61     public IIdentifier getIdentifier() {
62         return identifier;
63     }
64
65     /**
66      * Returns whether or not the activityIds property changed.
67      *
68      * @return <code>true</code>, iff the activityIds property changed.
69      */

70     public boolean hasActivityIdsChanged() {
71         return activityIdsChanged;
72     }
73
74     /**
75      * Returns whether or not the enabled property changed.
76      *
77      * @return <code>true</code>, iff the enabled property changed.
78      */

79     public boolean hasEnabledChanged() {
80         return enabledChanged;
81     }
82 }
83
Popular Tags