Mercurial > projects > dwt-addons
comparison dwtx/core/commands/common/AbstractHandleObjectEvent.d @ 3:6518c18a01f7
eclipse.core package without osgi dependencies
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 26 Mar 2008 00:57:19 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:a012107a911c | 3:6518c18a01f7 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2005 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 ******************************************************************************/ | |
13 | |
14 module dwtx.core.commands.common.AbstractHandleObjectEvent; | |
15 | |
16 import dwtx.core.commands.common.AbstractBitSetEvent; | |
17 | |
18 /** | |
19 * <p> | |
20 * An event fired from a <code>NamedHandleObject</code>. This provides | |
21 * notification of changes to the defined state, the name and the description. | |
22 * </p> | |
23 * | |
24 * @since 3.2 | |
25 */ | |
26 public abstract class AbstractHandleObjectEvent : AbstractBitSetEvent { | |
27 | |
28 /** | |
29 * The bit used to represent whether the category has changed its defined | |
30 * state. | |
31 */ | |
32 protected static const int CHANGED_DEFINED = 1; | |
33 | |
34 /** | |
35 * The last used bit so that subclasses can add more properties. | |
36 */ | |
37 protected static const int LAST_BIT_USED_ABSTRACT_HANDLE = CHANGED_DEFINED; | |
38 | |
39 /** | |
40 * Constructs a new instance of <code>AbstractHandleObjectEvent</code>. | |
41 * | |
42 * @param definedChanged | |
43 * <code>true</code>, iff the defined property changed. | |
44 */ | |
45 protected this( bool definedChanged) { | |
46 if (definedChanged) { | |
47 changedValues |= CHANGED_DEFINED; | |
48 } | |
49 } | |
50 | |
51 /** | |
52 * Returns whether or not the defined property changed. | |
53 * | |
54 * @return <code>true</code>, iff the defined property changed. | |
55 */ | |
56 public final bool isDefinedChanged() { | |
57 return ((changedValues & CHANGED_DEFINED) !is 0); | |
58 } | |
59 } |