com.pietschy.command
Class ContainerPropertyListenerSupport

java.lang.Object
  extended by com.pietschy.command.ContainerPropertyListenerSupport

 class ContainerPropertyListenerSupport
extends java.lang.Object

Manages container property listener registration and the firing of events.


Constructor Summary
ContainerPropertyListenerSupport(Command parent)
           
 
Method Summary
 void addPropertyChangeListener(java.lang.String property, ContainerPropertyListener listener)
          Adds a listener for the specified property.
(package private)  void firePropertyChanged(java.lang.String propertyName, java.lang.Object value)
           
 CommandContainer getCommandContainer()
          Gets the current command container.
(package private)  javax.swing.event.EventListenerList getListenerListFor(java.lang.String property)
           
protected  java.lang.Object getPropertyValue(java.lang.String property)
           
(package private)  boolean hasListenerListFor(java.lang.String property)
           
 void removePropertyChangeListener(java.lang.String property, ContainerPropertyListener listener)
          Removes a listener previously added with addPropertyChangeListener(String, ContainerPropertyListener).
 void setCommandContainer(CommandContainer commandContainer)
          Sets the current command container to monitor and derive all property values from.
(package private)  void updateAllProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerPropertyListenerSupport

ContainerPropertyListenerSupport(Command parent)
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String property,
                                      ContainerPropertyListener listener)
Adds a listener for the specified property.

Parameters:
property - the property to monitor.
listener - the listener.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String property,
                                         ContainerPropertyListener listener)
Removes a listener previously added with addPropertyChangeListener(String, ContainerPropertyListener).

Parameters:
property - the property that was being monitored.
listener - the listener to remove.

setCommandContainer

public void setCommandContainer(CommandContainer commandContainer)
Sets the current command container to monitor and derive all property values from.

Parameters:
commandContainer - the command container.

getCommandContainer

public CommandContainer getCommandContainer()
Gets the current command container.

Returns:
the current command container.

updateAllProperties

void updateAllProperties()

firePropertyChanged

void firePropertyChanged(java.lang.String propertyName,
                         java.lang.Object value)

getPropertyValue

protected java.lang.Object getPropertyValue(java.lang.String property)

hasListenerListFor

boolean hasListenerListFor(java.lang.String property)

getListenerListFor

javax.swing.event.EventListenerList getListenerListFor(java.lang.String property)


Copyright © 2006 - 2007 Andrew Pietsch