JHotDraw 7.4.1

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, AbstractApplicationModel, AbstractColorSlidersModel, AbstractConstrainer, AbstractFigure, AbstractTool, DefaultDrawingEditor, DrawingEditorProxy

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

This abstract class can be extended to implement a JavaBean.

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

Version:
$Id: AbstractBean.java 604 2010-01-09 12:00:29Z rawcoder $
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)
          Adds a PropertyChangeListener which can optionally be wrapped into a WeakPropertyChangeListener.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener which can optionally be wrapped into a WeakPropertyChangeListener.
 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)
           
 java.beans.PropertyChangeListener[] getPropertyChangeListeners()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 
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)
Adds a PropertyChangeListener which can optionally be wrapped into a WeakPropertyChangeListener.

Parameters:
listener -

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener which can optionally be wrapped into a WeakPropertyChangeListener.

Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. If the listener was added wrapped into a WeakPropertyChangeListener, the WeakPropertyChangeListener is removed.

Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. If the listener was added wrapped into a WeakPropertyChangeListener, the WeakPropertyChangeListener is removed.

Parameters:
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

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners()

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.