rafa
Class NamedListened

java.lang.Object
  extended by rafa.NamedListened
All Implemented Interfaces:
Listened, Named
Direct Known Subclasses:
FilteredGenerator, LimitingFilter, NumberGenerator, ScaleFilter, ShiftFilter

public abstract class NamedListened
extends java.lang.Object
implements Named, Listened

Implementation for named objects which notify their listeners of any changes.

Author:
rafa

Nested Class Summary
static class NamedListened.Property
          Properties offered by this object to change listeners.
 
Field Summary
protected  java.lang.String name
           
protected  java.beans.PropertyChangeSupport propertyChangeSupport
           
 
Constructor Summary
protected NamedListened()
           
 
Method Summary
 void addListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)
          Adds a listener to this object.
 java.lang.String getName()
           
 void removeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

propertyChangeSupport

protected java.beans.PropertyChangeSupport propertyChangeSupport
Constructor Detail

NamedListened

protected NamedListened()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Named
Returns:

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Named
Parameters:
name -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addListener

public void addListener(java.lang.String propertyName,
                        java.beans.PropertyChangeListener pcl)
Adds a listener to this object. If propertyName is null, any property change will fire the listener (see PropertyChangeSupport).

Specified by:
addListener in interface Listened

removeListener

public void removeListener(java.lang.String propertyName,
                           java.beans.PropertyChangeListener pcl)
Specified by:
removeListener in interface Listened


Copyright © 2008-2009. All Rights Reserved.