1 19 package org.netbeans.api.mdr.events; 20 21 import java.util.EventObject ; 22 23 33 public abstract class MDRChangeEvent extends EventObject { 34 37 public static final int EVENTMASK_ALL = 0x0FFFFFFF; 38 39 41 public static final int EVENTMASK_ON_ASSOCIATION = AssociationEvent.EVENTMASK_ASSOCIATION; 42 44 public static final int EVENTMASK_ON_INSTANCE = InstanceEvent.EVENT_INSTANCE_CREATE | AttributeEvent.EVENTMASK_ATTRIBUTE; 45 47 public static final int EVENTMASK_ON_CLASS = InstanceEvent.EVENT_INSTANCE_DELETE | AttributeEvent.EVENTMASK_CLASSATTR; 48 57 public static final int EVENTMASK_ON_PACKAGE = 0x0000000; 58 60 public static final int EVENTMASK_ON_REPOSITORY = ExtentEvent.EVENTMASK_EXTENT | TransactionEvent.EVENTMASK_TRANSACTION; 61 62 private final int eventType; 64 65 69 public MDRChangeEvent(Object source, int type) { 70 super(source); 71 eventType = type; 72 } 73 74 77 public int getType() { 78 return eventType; 79 } 80 81 87 public boolean isOfType(int mask) { 88 return ((eventType & mask) == eventType); 89 } 90 } 91 | Popular Tags |