Package com.adobe.xfa
Class Dispatcher
- java.lang.Object
-
- com.adobe.xfa.Dispatcher
-
- All Implemented Interfaces:
Peer
- Direct Known Subclasses:
ScriptDispatcher
public abstract class Dispatcher extends java.lang.Object implements Peer
-
-
Field Summary
-
Fields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED
-
-
Constructor Summary
Constructors Constructor Description Dispatcher(Element poActionContextNode, java.lang.String sEventContext, int nEventID, EventManager poEventManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPeer(Peer peerNode)
Add a peer node to be notified of state changes.void
addPeeredNode(Peer peer)
void
clearPeers()
Removes this node from all peer relationships.void
deafen()
Makes this peer deaf to any updateFromPeer calls made by notifyPeersElement
getActionContextNode()
abstract java.lang.String
getDispatcherType()
java.lang.String
getEventContext()
Obj
getEventContextObj()
int
getEventID()
EventManager
getEventManager()
boolean
getListenToDescendents()
boolean
getOccurring()
java.lang.String
getParameter(int nParam)
Peer
getPeer(int nPeer)
return the requested peerboolean
getRecurring()
boolean
isDeaf()
Checks if this peer is deaf.boolean
isMute()
Checks if this peer is mute.void
mute()
Makes this peer no longer notify its peers when notifyPeers is calledvoid
notifyPeers(int eventType, java.lang.String arg1, java.lang.Object arg2)
Sends notification to the peer nodes that this object has changed.void
peerRemoved(Peer peer)
Called when this Peer is removed frompeer
.void
removePeer(Peer oPeerNode)
Remove a peer node from the notification list.void
removePeeredNode(Peer poPeer)
void
setEventContextObj(Obj poObject)
void
setEventManager(EventManager poEventManager)
void
setListenToDescendents(boolean bListenToDescendents)
void
setOccurring(boolean bOccurring)
void
setRecurring(boolean bRecurring)
void
unDeafen()
Allows this peer to receive updateFromPeer callsvoid
unMute()
Allows this peer to notify its peers when notifyPeers is called.void
updateFromPeer(java.lang.Object oPeerNode, int eventType, java.lang.String arg1, java.lang.Object arg2)
This method will be called by the peer whenever its state changes.
-
-
-
Constructor Detail
-
Dispatcher
public Dispatcher(Element poActionContextNode, java.lang.String sEventContext, int nEventID, EventManager poEventManager)
-
-
Method Detail
-
addPeer
public void addPeer(Peer peerNode)
Description copied from interface:Peer
Add a peer node to be notified of state changes.
-
addPeeredNode
public void addPeeredNode(Peer peer)
- Specified by:
addPeeredNode
in interfacePeer
-
clearPeers
public void clearPeers()
Description copied from interface:Peer
Removes this node from all peer relationships.- Specified by:
clearPeers
in interfacePeer
-
deafen
public void deafen()
Description copied from interface:Peer
Makes this peer deaf to any updateFromPeer calls made by notifyPeers
-
getActionContextNode
public Element getActionContextNode()
-
getDispatcherType
public abstract java.lang.String getDispatcherType()
-
getEventContext
public java.lang.String getEventContext()
-
getEventContextObj
public Obj getEventContextObj()
-
getEventID
public int getEventID()
-
getEventManager
public EventManager getEventManager()
-
getListenToDescendents
public boolean getListenToDescendents()
-
getOccurring
public boolean getOccurring()
-
getParameter
public java.lang.String getParameter(int nParam)
-
getPeer
public Peer getPeer(int nPeer)
return the requested peer
-
getRecurring
public boolean getRecurring()
-
isDeaf
public boolean isDeaf()
Description copied from interface:Peer
Checks if this peer is deaf.
-
isMute
public boolean isMute()
Description copied from interface:Peer
Checks if this peer is mute.
-
mute
public void mute()
Description copied from interface:Peer
Makes this peer no longer notify its peers when notifyPeers is called
-
notifyPeers
public void notifyPeers(int eventType, java.lang.String arg1, java.lang.Object arg2)
Description copied from interface:Peer
Sends notification to the peer nodes that this object has changed.- Specified by:
notifyPeers
in interfacePeer
- Parameters:
eventType
- the event type as enumerated in this classarg1
- additional event informationarg2
- additional event information
-
peerRemoved
public void peerRemoved(Peer peer)
Description copied from interface:Peer
Called when this Peer is removed frompeer
. Derived classes can override this method to receive direct notifications when a peer is removed.- Specified by:
peerRemoved
in interfacePeer
- Parameters:
peer
- the Peer from which this Peer has been removed from notification.
-
removePeer
public void removePeer(Peer oPeerNode)
Remove a peer node from the notification list.- Specified by:
removePeer
in interfacePeer
- Parameters:
oPeerNode
- - The reference to the peer object to be removed.
-
removePeeredNode
public void removePeeredNode(Peer poPeer)
- Specified by:
removePeeredNode
in interfacePeer
-
setEventContextObj
public void setEventContextObj(Obj poObject)
-
setEventManager
public void setEventManager(EventManager poEventManager)
-
setListenToDescendents
public void setListenToDescendents(boolean bListenToDescendents)
-
setOccurring
public void setOccurring(boolean bOccurring)
-
setRecurring
public void setRecurring(boolean bRecurring)
-
unDeafen
public void unDeafen()
Description copied from interface:Peer
Allows this peer to receive updateFromPeer calls
-
unMute
public void unMute()
Description copied from interface:Peer
Allows this peer to notify its peers when notifyPeers is called.
-
updateFromPeer
public void updateFromPeer(java.lang.Object oPeerNode, int eventType, java.lang.String arg1, java.lang.Object arg2)
Description copied from interface:Peer
This method will be called by the peer whenever its state changes.eventType (String)arg1 (Object)arg2 UPDATED update type (optional) ATTR_CHANGED attr name (optional) CHILD_ADDED (optional) added node CHILD_REMOVED (optional) removed node VALUE_CHANGED new data (optional) PARENT_CHANGED (optional) new parent DESCENDENT_ATTR_CHANGED attr name changed node DESCENDENT_VALUE_CHANGED (optional) changed node DESCENDENT_ADDED (optional) added node DESCENDENT_REMOVED (optional) removed node PERMS_LOCK_SET (optional) (optional) PERMS_LOCK_CLEARED (optional) (optional) PROTO_ATTR_CHANGED attr name changed node PROTO_CHILD_ADDED (optional) added node of the protoype PROTO_CHILD_REMOVED (optional) removed node from the prototype PROTO_VALUE_CHANGED new data prototype node PROTO_DESCENDENT_ATTR_CHANGED attr name changed prototype node PROTO_DESCENDENT_VALUE_CHANGED (optional) changed prototype node PROTO_DESCENDENT_ADDED (optional) added node to the prototype PROTO_DESCENDENT_REMOVED (optional) removed node from the prototype
- Specified by:
updateFromPeer
in interfacePeer
- Parameters:
oPeerNode
- the peer to this object.eventType
- the event type as enumerated in this classarg1
- additional event informationarg2
- additional event information
-
-