org.jhotdraw.beans
Class AbstractBean

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractApplication, AbstractColorSlidersModel, AbstractConstrainer, AbstractFigure, AbstractTool, DefaultApplicationModel, DefaultDrawingEditor, DrawingEditorProxy

public class AbstractBean
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Abstract class for objects which have to support property change listeners.

Implements the methods required for adding and removing property change listeners.

Version:
1.2 2006-06-21 Implemented Cloneable. The cloned object has no listeners assigned to it.
1.1 2004-01-18
1.0 2001-08-04
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport propertySupport
           
 
Constructor Summary
AbstractBean()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 AbstractBean clone()
           
protected  void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
           
protected  void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
           
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertySupport

protected java.beans.PropertyChangeSupport propertySupport
Constructor Detail

AbstractBean

public AbstractBean()
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  boolean oldValue,
                                  boolean newValue)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  int oldValue,
                                  int newValue)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)

clone

public AbstractBean clone()
Overrides:
clone in class java.lang.Object