When you construct a NotificationPropertyActionListener, you pass the view, notification, and property that it will use to fire property change events. When the listener detects an action from the component to which it is listening, it will call getOldValue() and getNewValue() to determine what values to put in the NotificationStates. Then it will call CALOComponent.firePropertyChange(String, Object, Object) in the view to automatically fire the property change on its behalf.
Public Member Functions | |
NotificationPropertyActionListener (CALOComponent view, Notification n, NotificationState.NotificationStateProperty property) | |
Create a new NotificationPropertyActionListener. | |
void | actionPerformed (ActionEvent e) |
Notify others about the action being performed. | |
abstract Object | getNewValue () |
A getter for newValue. | |
abstract Object | getOldValue () |
A getter for oldValue. | |
Properties | |
NotificationStateProperty | |
The property that changed. | |
Private Attributes | |
Notification | notification |
The notification associated with this change. | |
CALOComponent | view |
The view from which this change originated. |
edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.NotificationPropertyActionListener | ( | CALOComponent | view, | |
Notification | n, | |||
NotificationState.NotificationStateProperty | property | |||
) |
Create a new NotificationPropertyActionListener.
view | the view from which the change originated | |
n | the notification associated with the change | |
property | the property that changed |
void edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.actionPerformed | ( | ActionEvent | e | ) |
Notify others about the action being performed.
e | the event to forward |
abstract Object edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.getNewValue | ( | ) | [pure virtual] |
A getter for newValue.
abstract Object edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.getOldValue | ( | ) | [pure virtual] |
A getter for oldValue.
Notification edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.notification [private] |
The notification associated with this change.
The view from which this change originated.
edu.cmu.hcii.calo.view.notification.NotificationPropertyActionListener.NotificationStateProperty [private] |
The property that changed.