1 19 package org.netbeans.api.mdr.events; 20 21 import javax.jmi.reflect.RefFeatured; 22 23 28 public class AttributeEvent extends MDRChangeEvent { 29 30 public static final int POSITION_NONE = -1; 31 32 33 public static final int EVENTMASK_ATTRIBUTE = 0x101FFFF; 34 35 public static final int EVENTMASK_CLASSATTR = 0x102FFFF; 36 37 40 public static final int EVENT_ATTRIBUTE_SET = 0x1010001; 41 42 public static final int EVENT_ATTRIBUTE_ADD = 0x1010002; 43 44 public static final int EVENT_ATTRIBUTE_REMOVE = 0x1010004; 45 46 49 public static final int EVENT_CLASSATTR_SET = 0x1020001; 50 52 public static final int EVENT_CLASSATTR_ADD = 0x1020002; 53 55 public static final int EVENT_CLASSATTR_REMOVE = 0x1020004; 56 57 private final String attrName; 58 private final Object oldElement; 59 private final Object newElement; 60 private final int position; 61 62 70 public AttributeEvent(RefFeatured source, int type, String attrName, Object oldElement, Object newElement, int position) { 71 super(source, type); 72 this.attrName = attrName; 73 this.oldElement = oldElement; 74 this.newElement = newElement; 75 this.position = position; 76 } 77 78 81 public String getAttributeName() { 82 return attrName; 83 } 84 85 88 public Object getOldElement() { 89 return oldElement; 90 } 91 92 95 public Object getNewElement() { 96 return newElement; 97 } 98 99 102 public int getPosition() { 103 return position; 104 } 105 } 106 | Popular Tags |