站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

MDRChangeEvent (NetBeans MDR API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.api.mdr.events
Class MDRChangeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.netbeans.api.mdr.events.MDRChangeEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AssociationEvent, AttributeEvent, ExtentEvent, InstanceEvent, TransactionEvent

public abstract class MDRChangeEvent
extends EventObject

Root abstract class for all MDR events. Every MDR event has a type uniquely identified by an integer. The integers representing the event types are chosen in such a way, that they can be uniquely combined into a bitmask without losing information about which event types are represented in the bitmask. This way the event listeners can filter the events using a bitmask.

See Also:
Serialized Form

Field Summary
static int EVENTMASK_ALL
          Bitmask representing all possible repository event types.
static int EVENTMASK_ON_ASSOCIATION
          Bitmask representing all event types which are initially fired on associations.
static int EVENTMASK_ON_CLASS
          Bitmask representing all event types which are initially fired on class proxies.
static int EVENTMASK_ON_INSTANCE
          Bitmask representing all event types which are initially fired on instance objects.
static int EVENTMASK_ON_PACKAGE
          Bitmask representing all event types which are initially fired on package proxies.
static int EVENTMASK_ON_REPOSITORY
          Bitmask representing all event types which are initially fired on repositories.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MDRChangeEvent(Object source, int type)
          Creates a new instance of MDR event
 
Method Summary
 int getType()
          Returns type of this event.
 boolean isOfType(int mask)
          Returns true if the type of this event is contained in the provided bitmask.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EVENTMASK_ALL

public static final int EVENTMASK_ALL
Bitmask representing all possible repository event types. Can be used for registering listener to receive all kinds of events.

See Also:
Constant Field Values

EVENTMASK_ON_ASSOCIATION

public static final int EVENTMASK_ON_ASSOCIATION
Bitmask representing all event types which are initially fired on associations.

See Also:
Constant Field Values

EVENTMASK_ON_INSTANCE

public static final int EVENTMASK_ON_INSTANCE
Bitmask representing all event types which are initially fired on instance objects.

See Also:
Constant Field Values

EVENTMASK_ON_CLASS

public static final int EVENTMASK_ON_CLASS
Bitmask representing all event types which are initially fired on class proxies.

See Also:
Constant Field Values

EVENTMASK_ON_PACKAGE

public static final int EVENTMASK_ON_PACKAGE
Bitmask representing all event types which are initially fired on package proxies.

Note: This bitmask is empty, because there are not events which originate on packages. Packages receive only events propagated from other objects. As a consequence this bitmask is useless. It is nevertheless part of the API to achieve greater uniformity of the API.

See Also:
Constant Field Values

EVENTMASK_ON_REPOSITORY

public static final int EVENTMASK_ON_REPOSITORY
Bitmask representing all event types which are initially fired on repositories.

See Also:
Constant Field Values
Constructor Detail

MDRChangeEvent

public MDRChangeEvent(Object source,
                      int type)
Creates a new instance of MDR event

Parameters:
source - Source object for this event.
type - Number indicating type of this event.
Method Detail

getType

public int getType()
Returns type of this event.

Returns:
Number indicating type of this event.

isOfType

public boolean isOfType(int mask)
Returns true if the type of this event is contained in the provided bitmask.

Parameters:
mask - Bitmask.
Returns:
true - the type of this event is contained in the bitmask (i.e. type & mask == type) false - the type of this event is not contained in the bitmask (i.e. type & mask < type)

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.