JHotDraw 7.4.1

org.jhotdraw.draw
Class AbstractConstrainer

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
      extended by org.jhotdraw.draw.AbstractConstrainer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Constrainer
Direct Known Subclasses:
GridConstrainer

public abstract class AbstractConstrainer
extends AbstractBean
implements Constrainer

This abstract class can be extended to implement a Constrainer.

Version:
$Id: AbstractConstrainer.java 527 2009-06-07 14:28:19Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
protected  javax.swing.event.ChangeEvent changeEvent
          Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property.
protected  javax.swing.event.EventListenerList listenerList
          The listeners waiting for model changes.
 
Fields inherited from class org.jhotdraw.beans.AbstractBean
propertySupport
 
Constructor Summary
AbstractConstrainer()
          Creates a new instance.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a ChangeListener.
 AbstractConstrainer clone()
           
protected  void fireStateChanged()
          Runs each ChangeListener's stateChanged method.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a ChangeListener.
 
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jhotdraw.draw.Constrainer
constrainAngle, constrainPoint, constrainRectangle, draw, rotateAngle, translatePoint, translateRectangle
 

Field Detail

listenerList

protected javax.swing.event.EventListenerList listenerList
The listeners waiting for model changes.


changeEvent

protected transient javax.swing.event.ChangeEvent changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".

Constructor Detail

AbstractConstrainer

public AbstractConstrainer()
Creates a new instance.

Method Detail

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener.

Specified by:
addChangeListener in interface Constrainer

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.

Specified by:
removeChangeListener in interface Constrainer

fireStateChanged

protected void fireStateChanged()
Runs each ChangeListener's stateChanged method.

See Also:
EventListenerList

clone

public AbstractConstrainer clone()
Overrides:
clone in class AbstractBean

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