com.cycling74.jitter
Class JitterListener

java.lang.Object
  |
  +--com.cycling74.jitter.JitterObject
        |
        +--com.cycling74.jitter.JitterListener
All Implemented Interfaces:
JitterNotifiable

public class JitterListener
extends JitterObject
implements JitterNotifiable

JitterListener permits the attachment of a JitterNotifiable client to named instances of JitterObject (the subject), listening for JitterEvents from objects like jit.window, jit.pwindow, jit.matrix, potentially filtered based on some criteria

Author:
Joshua Kit Clayton

Fields inherited from class com.cycling74.jitter.JitterObject
_p_obj
 
Constructor Summary
JitterListener()
          creates a JitterListener with no target or callback
JitterListener(java.lang.String subject, JitterNotifiable client)
          creates a JitterListener with a named target, and client
 
Method Summary
 JitterNotifiable getClient()
           
 java.lang.String getSubjectName()
           
 void notify(JitterEvent e)
          the notify method is called when a JitterEvent needs to be reported.
 void setClient(JitterNotifiable client)
           
 void setSubjectName(java.lang.String subject)
           
 
Methods inherited from class com.cycling74.jitter.JitterObject
_new, bang, call, call, call, call, call, call, call, call, finalize, freePeer, getAttr, getAttrFloat, getAttrFloatArray, getAttrInt, getAttrIntArray, getAttrString, getAttrStringArray, getJitterClass, matrixcalc, send, send, send, send, send, send, send, send, send, send, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, understands
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JitterListener

public JitterListener()
creates a JitterListener with no target or callback

JitterListener

public JitterListener(java.lang.String subject,
                      JitterNotifiable client)
creates a JitterListener with a named target, and client
Parameters:
subject - the name of the subject
client - JitterNotifiable to be called with any messages/events
Method Detail

setSubjectName

public void setSubjectName(java.lang.String subject)
Parameters:
subject - the subject name to set

getSubjectName

public java.lang.String getSubjectName()
Returns:
the subject name

setClient

public void setClient(JitterNotifiable client)
Parameters:
client - the JitterNotifiable client to use. all events will be sent to this object's notify() method.

getClient

public JitterNotifiable getClient()
Returns:
the JitterNotifiable client in use

notify

public void notify(JitterEvent e)
Description copied from interface: JitterNotifiable
the notify method is called when a JitterEvent needs to be reported.
Specified by:
notify in interface JitterNotifiable
Parameters:
e - the JitterEvent that will be sent to the client's notify() method