Package com.globalmentor.beans
Class PostponedPropertyChangeEvent
- java.lang.Object
-
- com.globalmentor.beans.PostponedPropertyChangeEvent
-
- All Implemented Interfaces:
PostponedEvent<java.beans.PropertyChangeEvent>
public class PostponedPropertyChangeEvent extends java.lang.Object implements PostponedEvent<java.beans.PropertyChangeEvent>
Encapsulation of a property change event and its associated property change support, queued for later firing.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description PostponedPropertyChangeEvent(java.beans.PropertyChangeSupport propertyChangeSupport, java.beans.PropertyChangeEvent propertyChangeEvent)
Creates a postponed property change event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fireEvent()
Reports that a bound property has changed.java.beans.PropertyChangeEvent
getEvent()
protected java.beans.PropertyChangeSupport
getPropertyChangeSupport()
boolean
isFired()
-
-
-
Constructor Detail
-
PostponedPropertyChangeEvent
public PostponedPropertyChangeEvent(java.beans.PropertyChangeSupport propertyChangeSupport, java.beans.PropertyChangeEvent propertyChangeEvent)
Creates a postponed property change event.- Parameters:
propertyChangeSupport
- The property change support that will ultimately fire the property change event, ornull
if there is no property change support and therefore no listeners.propertyChangeEvent
- The property change event that has been postponed.- Throws:
java.lang.NullPointerException
- if the property change event isnull
.
-
-
Method Detail
-
isFired
public boolean isFired()
- Specified by:
isFired
in interfacePostponedEvent<java.beans.PropertyChangeEvent>
- Returns:
- Whether the postponed event has been fired.
-
getPropertyChangeSupport
protected java.beans.PropertyChangeSupport getPropertyChangeSupport()
- Returns:
- The property change support that will ultimately fire the property change event, or
null
if there is no property change support and therefore no listeners.
-
getEvent
public java.beans.PropertyChangeEvent getEvent()
- Specified by:
getEvent
in interfacePostponedEvent<java.beans.PropertyChangeEvent>
- Returns:
- The property change event that has been postponed.
-
fireEvent
public void fireEvent()
Reports that a bound property has changed. This method does the actual delegation to the property change support.- Specified by:
fireEvent
in interfacePostponedEvent<java.beans.PropertyChangeEvent>
- Throws:
java.lang.IllegalStateException
- if the postponed property change event has already been fired.
-
-