|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject org.netbeans.api.mdr.events.MDRChangeEvent org.netbeans.api.mdr.events.AttributeEvent
Class represeting MDR events related to changes of repository object (class/instance) attributes.
Field Summary | |
static int |
EVENT_ATTRIBUTE_ADD
Event type indicating that a value element of a multi-valued instance attribute is to be/was added |
static int |
EVENT_ATTRIBUTE_REMOVE
Event type indicating that a value element of a multi-valued instance attribute is to be/was removed |
static int |
EVENT_ATTRIBUTE_SET
Event type indicating that a value of a single-valued instance attribute is to be/was changed or a value element of a multi-valued instance attribute is to be/was changed. |
static int |
EVENT_CLASSATTR_ADD
Event type indicating that a value element of a multi-valued classifier attribute is to be/was added |
static int |
EVENT_CLASSATTR_REMOVE
Event type indicating that a value element of a multi-valued classifier attribute is to be/was removed |
static int |
EVENT_CLASSATTR_SET
Event type indicating that a value of a single-valued classifier attribute is to be/was changed or a value element of a multi-valued classifier attribute is to be/was changed. |
static int |
EVENTMASK_ATTRIBUTE
Bitmask representing all event types related to instance attribute changes |
static int |
EVENTMASK_CLASSATTR
Bitmask representing all event types related to classifier attribute changes |
static int |
POSITION_NONE
Value indicating unspecified position |
Fields inherited from class org.netbeans.api.mdr.events.MDRChangeEvent |
EVENTMASK_ALL, EVENTMASK_ON_ASSOCIATION, EVENTMASK_ON_CLASS, EVENTMASK_ON_INSTANCE, EVENTMASK_ON_PACKAGE, EVENTMASK_ON_REPOSITORY |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
AttributeEvent(javax.jmi.reflect.RefFeatured source,
int type,
String attrName,
Object oldElement,
Object newElement,
int position)
Creates new AttributeEvent instance. |
Method Summary | |
String |
getAttributeName()
Returns name of an attribute affected by this event. |
Object |
getNewElement()
Returns a new value of the element affected by this event or null if not applicable. |
Object |
getOldElement()
Returns original value of the element affected by this event or null if not applicable. |
int |
getPosition()
Returns original position of element affected by this event or POSITION_NONE if not applicable. |
Methods inherited from class org.netbeans.api.mdr.events.MDRChangeEvent |
getType, isOfType |
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 |
public static final int POSITION_NONE
public static final int EVENTMASK_ATTRIBUTE
public static final int EVENTMASK_CLASSATTR
public static final int EVENT_ATTRIBUTE_SET
public static final int EVENT_ATTRIBUTE_ADD
public static final int EVENT_ATTRIBUTE_REMOVE
public static final int EVENT_CLASSATTR_SET
public static final int EVENT_CLASSATTR_ADD
public static final int EVENT_CLASSATTR_REMOVE
Constructor Detail |
public AttributeEvent(javax.jmi.reflect.RefFeatured source, int type, String attrName, Object oldElement, Object newElement, int position)
source
- Event source (class proxy or instance).type
- Event type.attrName
- Name of the attribute that was changed.oldElement
- Original attribute value (for single-valued) or value element (for multi-valued attribute) or null if not applicable (e.g. in case of ADD event).newElement
- New attribute value (for single-valued) or value element (for multi-valued attribute) or null if not applicable (e.g. in case of REMOVE event).position
- Position of the affected element or POSITION_NONE if not applicable (e.g. in case of unordered multi-valued attributes).Method Detail |
public String getAttributeName()
public Object getOldElement()
public Object getNewElement()
public int getPosition()
POSITION_NONE
if not applicable.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |