com.miginfocom.util
Interface PropertyObservable

All Known Subinterfaces:
Activity, MutableDateRange
All Known Implementing Classes:
AbstractActivity, Category, DateRange, DefaultActivity, DemoDataBean

public interface PropertyObservable

Can be implemented to note that you are using the Observable pattern for properties.


Method Summary
 void addPropertyListener(java.beans.PropertyChangeListener l)
          Adds a listener that should be notified of all changes that to the property values of this com.miginfocom.theme.
This is usually just implemented as addPropertyListener(l, false)
 void addPropertyListener(java.beans.PropertyChangeListener l, boolean asWeakRef)
          Adds a listener that should be notified of all changes that to the property values of this com.miginfocom.theme
 boolean isIgnorePropertyEvents()
          Returns if the PropertyObservable is currently ignoring change events.
 void removePropertyListener(java.beans.PropertyChangeListener l)
          Removes a listener if it is in the list.
 boolean setIgnorePropertyEvents(boolean b)
          Sets if ChangeEvent's should be fired.
 

Method Detail

addPropertyListener

void addPropertyListener(java.beans.PropertyChangeListener l)
Adds a listener that should be notified of all changes that to the property values of this com.miginfocom.theme.
This is usually just implemented as addPropertyListener(l, false)

Parameters:
l - The listener.

addPropertyListener

void addPropertyListener(java.beans.PropertyChangeListener l,
                         boolean asWeakRef)
Adds a listener that should be notified of all changes that to the property values of this com.miginfocom.theme

Parameters:
l - The listener
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list.
Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.

removePropertyListener

void removePropertyListener(java.beans.PropertyChangeListener l)
Removes a listener if it is in the list.

Parameters:
l - the listener

setIgnorePropertyEvents

boolean setIgnorePropertyEvents(boolean b)
Sets if ChangeEvent's should be fired. If there are no listeners registered this method does nothing.

Parameters:
b - true or false...
Returns:
The old value.

isIgnorePropertyEvents

boolean isIgnorePropertyEvents()
Returns if the PropertyObservable is currently ignoring change events. If no lisneners returns true.

Returns:
If the PropertyObservable is currently ignoring change events


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.