|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
wt.clients.util.RefreshEvent
Class RefreshEvent
is an event class used
by clients for capturing object creation, modification, and
deletion events. This class maintains the type of action that has
occurred, the object on which the action occurred, and the object
which generated the event. This utility class is used in conjunction
with RefreshListener
and RefreshService
.
A RefreshEvent
is broadcast by the
RefreshService
to objects registered as
RefreshListeners
:
obj = (Object) MyTaskLogic.updateObject( obj ); RefreshEvent evt = new RefreshEvent( this, RefreshEvent.UPDATE, obj ); RefreshService.getRefreshService().dispatchRefresh( evt );
RefreshListener
,
Supported API: true
Extendable: false
,
Serialized FormField Summary | |
private int |
action
|
static int |
CREATE
Defined int constant representing a create action
being performed. |
static int |
DELETE
Defined int constant representing a delete action
being performed. |
private PropertyChangeEvent[] |
propertyChanges
|
private Object |
target
|
static int |
UNKNOWN
Defined int constant representing an unknown action
being performed. |
static int |
UPDATE
Defined int constant representing an update action
being performed. |
private static String |
versionID
|
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
RefreshEvent(Object source,
int action,
Object target)
Constructor for RefreshEvent . |
|
RefreshEvent(Object source,
int action,
Object target,
PropertyChangeEvent[] property_changes)
Constructor for RefreshEvent . |
Method Summary | |
int |
getAction()
Returns the action associated with the event. |
PropertyChangeEvent[] |
getPropertyChanges()
In the case of an UPDATE event, this method returns the array of PropertyChangeEvents that specify what updates occurred. |
Object |
getTarget()
Returns the target object on which the action of this event occurred. |
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 |
private int action
private Object target
private PropertyChangeEvent[] propertyChanges
public static final int UNKNOWN
int
constant representing an unknown action
being performed.
public static final int CREATE
int
constant representing a create action
being performed.
public static final int UPDATE
int
constant representing an update action
being performed.
public static final int DELETE
int
constant representing a delete action
being performed.
private static final String versionID
Constructor Detail |
public RefreshEvent(Object source, int action, Object target)
RefreshEvent
.
source
- the source Object
which is responsible
for generating this eventaction
- the int
action which has occurred (CREATE,
UPDATE, DELETE)target
- the target Object
on which the action
occurredpublic RefreshEvent(Object source, int action, Object target, PropertyChangeEvent[] property_changes)
RefreshEvent
. This constructor supports
passing the array of PropertyChangeEvents
that are
associated with an UPDATE event.
source
- the source Object
which is responsible
for generating this eventaction
- the int
action which has occurred (CREATE,
UPDATE, DELETE)target
- the target Object
on which the action
occurredproperty_changes
- the array of PropertyChangeEvents
that
correspond with an UPDATE eventMethod Detail |
public int getAction()
int
value representing the action of this
eventpublic Object getTarget()
Object
which has been created, updated, deleted.public PropertyChangeEvent[] getPropertyChanges()
PropertyChangeEvents
that specify what updates occurred.
The array is not intended to have meaning in the case of a CREATE or
DELETE event.
PropertyChangeEvent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |