Package com.adobe.xfa.ut
Interface Peer
- All Known Implementing Classes:
AppModel,AreaContainer,ArrayNodeList,Bind,BindingNode,BindItems,BooleanValue,Border,Button,Calculate,Caption,Chars,Color,Comment,CompoundAssertion,ConfigurationElement,ConfigurationKey,ConfigurationModel,ConfigurationUri,ConfigurationValue,Connect,ConnectionSetModel,Container,Content,ContentArea,DataModel,DataModel.AttributeWrapper,DataNode,DataWindow,DateTimeEdit,DateTimeValue,DateValue,DecimalValue,Delta,Dispatcher,Document,Draw,DSigData,EffectiveInputPolicy,EffectiveOutputPolicy,EffectivePolicy,Element,ElementNodeList,EventPseudoModel,EventTag,ExclGroup,ExDataValue,Field,Fill,FloatValue,FormChoiceListField,FormDataListener,FormExclGroup,FormField,FormInstanceManager,FormItemsDataListener,FormListener,FormManifest,FormModel,FormSubform,FormSubformSet,GenericNode,GenericTextContainer,HostPseudoModel,ImageValue,InstanceManager,IntegerValue,Items,Keep,LayoutNode,Linear,ListBase,LocaleSetModel,Manifest,Margin,Model,ModelPeer,Node,NodeList,Obj,Occur,Packet,PageArea,PageSet,Picture,Policy,PrimitiveAssertion,ProcessingInstruction,Proto,ProtoableNode,PseudoModel,RectangleValue,RichTextNode,Script,ScriptDispatcher,SetProperty,Subform,SubformSet,SVGNode,SVGTextData,TemplateModel,TextEdit,TextNode,TextValue,TimeValue,Traverse,UI,Value,Variables,WSDLBindingOperation,WSDLConnection,WSDLDocument,WSDLExten,WSDLMessage,WSDLNode,WSDLOperation,WSDLPart,XFAList,XMLConnection,XMLMultiSelectNode,XSDConnection
public interface Peer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intThis interface must be implemented by objects that use thePeerList.add()andPeerList.remove()methods.static final int -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a peer node to be notified of state changes.voidaddPeeredNode(Peer peer) voidRemoves this node from all peer relationships.voiddeafen()Makes this peer deaf to any updateFromPeer calls made by notifyPeersgetPeer(int nPeer) return the requested peerbooleanisDeaf()Checks if this peer is deaf.booleanisMute()Checks if this peer is mute.voidmute()Makes this peer no longer notify its peers when notifyPeers is calledvoidnotifyPeers(int eventType, String arg1, Object arg2) Sends notification to the peer nodes that this object has changed.voidpeerRemoved(Peer peer) Called when this Peer is removed frompeer.voidremovePeer(Peer peerNode) Remove a peer node from the notification list.voidremovePeeredNode(Peer peer) voidunDeafen()Allows this peer to receive updateFromPeer callsvoidunMute()Allows this peer to notify its peers when notifyPeers is called.voidupdateFromPeer(Object peerNode, int eventType, String arg1, Object arg2) This method will be called by the peer whenever its state changes.
-
Field Details
-
UPDATED
static final int UPDATEDThis interface must be implemented by objects that use thePeerList.add()andPeerList.remove()methods.A
Peercan add anotherPeerto its peer list viaaddPeer(). AllPeersin the peer list will be notified of peer changes whenupdateFromPeer()is called.- See Also:
-
ATTR_CHANGED
static final int ATTR_CHANGED- See Also:
-
VALUE_CHANGED
static final int VALUE_CHANGED- See Also:
-
PARENT_CHANGED
static final int PARENT_CHANGED- See Also:
-
CHILD_ADDED
static final int CHILD_ADDED- See Also:
-
CHILD_REMOVED
static final int CHILD_REMOVED- See Also:
-
DESCENDENT_ATTR_CHANGED
static final int DESCENDENT_ATTR_CHANGED- See Also:
-
DESCENDENT_VALUE_CHANGED
static final int DESCENDENT_VALUE_CHANGED- See Also:
-
DESCENDENT_ADDED
static final int DESCENDENT_ADDED- See Also:
-
DESCENDENT_REMOVED
static final int DESCENDENT_REMOVED- See Also:
-
PERMS_LOCK_SET
static final int PERMS_LOCK_SET- See Also:
-
PERMS_LOCK_CLEARED
static final int PERMS_LOCK_CLEARED- See Also:
-
PROTO_ATTR_CHANGED
static final int PROTO_ATTR_CHANGED- See Also:
-
PROTO_VALUE_CHANGED
static final int PROTO_VALUE_CHANGED- See Also:
-
PROTO_CHILD_ADDED
static final int PROTO_CHILD_ADDED- See Also:
-
PROTO_CHILD_REMOVED
static final int PROTO_CHILD_REMOVED- See Also:
-
PROTO_DESCENDENT_ATTR_CHANGED
static final int PROTO_DESCENDENT_ATTR_CHANGED- See Also:
-
PROTO_DESCENDENT_VALUE_CHANGED
static final int PROTO_DESCENDENT_VALUE_CHANGED- See Also:
-
PROTO_DESCENDENT_ADDED
static final int PROTO_DESCENDENT_ADDED- See Also:
-
PROTO_DESCENDENT_REMOVED
static final int PROTO_DESCENDENT_REMOVED- See Also:
-
-
Method Details
-
addPeer
Add a peer node to be notified of state changes.- Parameters:
peerNode- - The reference to the peer object to be added.
-
addPeeredNode
-
clearPeers
void clearPeers()Removes this node from all peer relationships. -
deafen
void deafen()Makes this peer deaf to any updateFromPeer calls made by notifyPeers -
getPeer
return the requested peer- Parameters:
nPeer- - the 0-based position of the peer to retrieve.- Returns:
- the peer at the requested position. When there are not more peers to return, this will return a null object.
-
isDeaf
boolean isDeaf()Checks if this peer is deaf.- Returns:
trueif this peer does not listen to notifyPeer calls, elsefalse.
-
isMute
boolean isMute()Checks if this peer is mute.- Returns:
trueif this peer does not notify its peers when notifyPeers is called, elsefalse.
-
mute
void mute()Makes this peer no longer notify its peers when notifyPeers is called -
notifyPeers
Sends notification to the peer nodes that this object has changed.- Parameters:
eventType- the event type as enumerated in this classarg1- additional event informationarg2- additional event information
-
removePeer
Remove a peer node from the notification list.- Parameters:
peerNode- the peer object to be removed
-
removePeeredNode
-
unDeafen
void unDeafen()Allows this peer to receive updateFromPeer calls -
unMute
void unMute()Allows this peer to notify its peers when notifyPeers is called. -
updateFromPeer
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
- Parameters:
peerNode- the peer to this object.eventType- the event type as enumerated in this classarg1- additional event informationarg2- additional event information
-
peerRemoved
Called when this Peer is removed frompeer. Derived classes can override this method to receive direct notifications when a peer is removed.- Parameters:
peer- the Peer from which this Peer has been removed from notification.
-