|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.activity.NotificationEvent
public abstract class NotificationEvent
The base class of the notification hierarchy. Every notification describes one change to one element called the target element.
A notification specifies the kind of change by its class. Subclasses provide additional context information appropriate for that specific event.
Notifications are routed to listeners though a number of
delivery paths. For example, a listener may hear about changes to an
element itself, to an ancestor element, to an associated style, and so on.
Some listeners may want to react differently depending on the element that
actually changed. The getDeliveryPath( )
method lets
the listener determine which path this event has taken.
Notifications are created in response to a model change. The UI that triggers the change can identify itself as the sender of the event. This allows the UI to ignore events that represent changes that it, itself, made. Using the sender attribute is purely optional, and is for the convenience of each particular bit of UI.
There are several constants defined in this class. Each of them is
corresponding to a kind of Event. When doing some operations, specified
command and record are invoked and the record will eventually send out a kind
of NotificationEvent, when calling the getEventType()
of the event,
the return value will be one of the constants defined here.
Field Summary | |
---|---|
static int |
ATTRIBUTE_EVENT
The event type of attributeEvent. |
static int |
CONTAINER
Event is being sent to the elements that contains the current element. |
static int |
CONTENT_EVENT
The event type of ContentEvent. |
static int |
CONTENT_REPLACE_EVENT
The event type of CONTENT_REPLACE_EVENT. |
static int |
CONTENTS
Event is being sent to the contents of the target. |
static int |
CSS_EVENT
The event type of css CRUD event |
static int |
CSS_RELOADED_EVENT
The event type of css reload event |
static int |
CUSTOM_MSG_EVENT
The event type of CustomMsgEvent. |
protected int |
deliveryPath
The current delivery path for the notification. |
static int |
DESCENDENT
Event is being sent to the descendants of the object. |
static int |
DIRECT
Event is being sent to the listeners of the object itself. |
static int |
DISPOSE_EVENT
The event type of DISPOSE_EVENT. |
static int |
ELEMENT_CLIENT
Event is being sent to the elements that use an element. |
static int |
ELEMENT_DELETE_EVENT
The event type of ElementDeletedEvent. |
static int |
ELEMENT_LOCALIZE_EVENT
The event type of ELEMENT_LOCALIZE_EVENT |
static int |
ENCRYPTION_EVENT
The event type of encryption change event. |
static int |
EXTENDS_EVENT
The event type of ExtendsEvent. |
static int |
EXTENSION_PROPERTY_DEFINITION_EVENT
The event type of PropertyListEvent. |
static int |
LAYOUT_CHANGED_EVENT
The event type of LAYOUT_CHANGED_EVENT. |
static int |
LIBRARY_CHANGE_EVENT
The event type of LIBRARY_CHANGE_EVENT |
static int |
LIBRARY_EVENT
The event type of LibraryEvent |
static int |
LIBRARY_RELOADED_EVENT
The event type of LIBRARY_RELOADED_EVENT |
static int |
NAME_EVENT
The event type of NameEvent. |
static int |
NAME_SPACE_EVENT
Deprecated. since BIRT 2.1 |
static int |
PROPERTY_EVENT
The event type of PrpertyEvent. |
protected java.lang.Object |
sender
The sender of the event. |
static int |
STRUCTURE_CLIENT
Event is being sent to the elements that use a structure defined in report design. |
static int |
STYLE_CLIENT
Event is being sent to elements that use a style. |
static int |
STYLE_EVENT
The event type of StyleEvent. |
protected org.eclipse.birt.report.model.core.DesignElement |
target
The design element that changed. |
static int |
TEMPLATE_TRANSFORM_EVENT
The event type of TEMPLATE_TRANSFORM_EVENT. |
static int |
THEME_EVENT
The event type of THEME_EVENT. |
static int |
USER_PROP_EVENT
The event type of UserPropertyEvent. |
static int |
VALIDATION_EVENT
The event type of ValidationEvent |
static int |
VIEWS_CONTENT_EVENT
The event type of multiple views event. |
Constructor Summary | |
---|---|
NotificationEvent()
Default constructor. |
|
NotificationEvent(org.eclipse.birt.report.model.core.DesignElement obj)
Convenience constructor that specifies the target element. |
Method Summary | |
---|---|
int |
getDeliveryPath()
Returns the delivery path by which the event was sent to the listener. |
abstract int |
getEventType()
Returns the event type. |
java.lang.Object |
getSender()
Returns the sender: the UI or other application object that caused the event to be sent. |
org.eclipse.birt.report.model.core.DesignElement |
getTarget()
Returns the target element: the part of the design that actually changed. |
boolean |
isSame(NotificationEvent event)
Compares and justifies whether this event and the given event is the same. |
void |
setDeliveryPath(int path)
Sets the delivery path. |
void |
setSender(java.lang.Object sender)
Sets the sender based on the information provided to the command. |
void |
setTarget(org.eclipse.birt.report.model.core.DesignElement target)
Sets the target element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CONTENT_EVENT
public static final int ELEMENT_DELETE_EVENT
public static final int EXTENDS_EVENT
public static final int NAME_EVENT
public static final int NAME_SPACE_EVENT
public static final int PROPERTY_EVENT
public static final int STYLE_EVENT
public static final int USER_PROP_EVENT
public static final int CUSTOM_MSG_EVENT
public static final int EXTENSION_PROPERTY_DEFINITION_EVENT
public static final int VALIDATION_EVENT
public static final int LIBRARY_EVENT
public static final int ATTRIBUTE_EVENT
public static final int DISPOSE_EVENT
public static final int LAYOUT_CHANGED_EVENT
public static final int THEME_EVENT
public static final int CONTENT_REPLACE_EVENT
public static final int TEMPLATE_TRANSFORM_EVENT
public static final int ELEMENT_LOCALIZE_EVENT
public static final int LIBRARY_RELOADED_EVENT
public static final int LIBRARY_CHANGE_EVENT
public static final int CSS_RELOADED_EVENT
public static final int CSS_EVENT
public static final int ENCRYPTION_EVENT
public static final int VIEWS_CONTENT_EVENT
public static final int DIRECT
public static final int DESCENDENT
public static final int STYLE_CLIENT
public static final int CONTENTS
public static final int ELEMENT_CLIENT
public static final int STRUCTURE_CLIENT
public static final int CONTAINER
protected org.eclipse.birt.report.model.core.DesignElement target
protected java.lang.Object sender
protected int deliveryPath
Constructor Detail |
---|
public NotificationEvent()
public NotificationEvent(org.eclipse.birt.report.model.core.DesignElement obj)
obj
- the target element.Method Detail |
---|
public int getDeliveryPath()
public void setDeliveryPath(int path)
path
- the delivery path to set.public java.lang.Object getSender()
public void setSender(java.lang.Object sender)
sender
- the sender to set.public org.eclipse.birt.report.model.core.DesignElement getTarget()
public void setTarget(org.eclipse.birt.report.model.core.DesignElement target)
target
- the target element to set.public abstract int getEventType()
public boolean isSame(NotificationEvent event)
event
- the event to compare
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |