Package edu.wisc.ssec.mcidasv.probes
Class ProbeEvent<T>
java.lang.Object
java.util.EventObject
edu.wisc.ssec.mcidasv.probes.ProbeEvent<T>
- All Implemented Interfaces:
Serializable
This class captures a change to a probe and stores both the previous and
current (as of the event's creation) changed values.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TCurrent value of the probe.private final TPrevious value of the probe.Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionProbeEvent(ReadoutProbe source, T oldValue, T newValue) Generated when aReadoutProbechanges either its position, color, or visibility. -
Method Summary
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
oldValue
Previous value of the probe. -
newValue
Current value of the probe.
-
-
Constructor Details
-
ProbeEvent
Generated when aReadoutProbechanges either its position, color, or visibility. Currently stores either position, color, or visibility both before and after the change.- Parameters:
source- Probe that generated this event.oldValue- Old value of the probe.newValue- New value of the probe.- Throws:
NullPointerException- if any parameters arenull.
-
-
Method Details
-
getProbe
Returns the probe that generated this event.- Returns:
- Probe from which this event originated.
-
getOldValue
Returns the value of the probe before this event was generated.- Returns:
- Previous probe value.
-
getNewValue
Returns the current (as of this event) value of the probe.- Returns:
- Current probe value.
-
toString
Returns a brief summary of this event. Please note that this format is subject to change.- Overrides:
toStringin classEventObject- Returns:
- String that looks like
[ProbeEvent@HASHCODE: source=..., oldValue=..., newValue=...].
-