KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > CategoryEvent


1 /*******************************************************************************
2  * Copyright (c) 2004, 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 package org.eclipse.core.commands;
12
13 import org.eclipse.core.commands.common.AbstractNamedHandleEvent;
14
15 /**
16  * An instance of this class describes changes to an instance of
17  * <code>Category</code>.
18  * <p>
19  * This class is not intended to be extended by clients.
20  * </p>
21  *
22  * @since 3.1
23  * @see ICategoryListener#categoryChanged(CategoryEvent)
24  */

25 public final class CategoryEvent extends AbstractNamedHandleEvent {
26
27     /**
28      * The category that has changed; this value is never <code>null</code>.
29      */

30     private final Category category;
31
32     /**
33      * Creates a new instance of this class.
34      *
35      * @param category
36      * the instance of the interface that changed.
37      * @param definedChanged
38      * true, iff the defined property changed.
39      * @param descriptionChanged
40      * true, iff the description property changed.
41      * @param nameChanged
42      * true, iff the name property changed.
43      */

44     public CategoryEvent(final Category category, final boolean definedChanged,
45             final boolean descriptionChanged, final boolean nameChanged) {
46         super(definedChanged, descriptionChanged, nameChanged);
47
48         if (category == null) {
49             throw new NullPointerException JavaDoc();
50         }
51         this.category = category;
52     }
53
54     /**
55      * Returns the instance of the interface that changed.
56      *
57      * @return the instance of the interface that changed. Guaranteed not to be
58      * <code>null</code>.
59      */

60     public final Category getCategory() {
61         return category;
62     }
63 }
64
Popular Tags