|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jstatcom.model.JSCDataEvent
public class JSCDataEvent
Events of this type are fired by JSCData
objects to
notify listeners like JSCSymbol
objects about changes of
various kinds. Instances of this class are constructed via the
static valueOf
factory methods.
Usage Note:
The events that are fired by the JSCData
objects are intended
for internal communication only. Events do not occur in the EventDispatchingThread
.
Clients should rather listen to changes in JSCSymbol
objects, especially
if GUI related actions are performed.
Constructor Summary | |
---|---|
JSCDataEvent(JSCData source,
JSCDataEventTypes type,
java.lang.Object oldValue,
java.lang.Object newValue)
Creates a JSCDataEvent . |
Method Summary | |
---|---|
java.lang.Object |
getNewValue()
Gets the value after the change. |
java.lang.Object |
getOldValue()
Gets the value before the change. |
JSCData |
getSource()
Gets the data object where the event was fired from. |
JSCDataEventTypes |
getType()
Gets the type of this event. |
boolean |
isSourceEmpty()
Gets the value after the change as a boolean . |
java.lang.String |
toString()
Gets a string representation of this. |
static JSCDataEvent |
valueOfChanged(JSCData source,
java.lang.Object oldValue,
java.lang.Object newValue)
Gets an instance of this for events of type JSCDataEventTypes.VALUE_CHANGED . |
static JSCDataEvent |
valueOfEmptyState(JSCData source,
boolean isEmptyNow)
Gets an instance of this for events of type JSCDataEventTypes.EMPTY_STATE . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSCDataEvent(JSCData source, JSCDataEventTypes type, java.lang.Object oldValue, java.lang.Object newValue)
JSCDataEvent
.
source
- the source data objecttype
- the type of this eventoldValue
- the value before the changenewValue
- the value after the changeMethod Detail |
---|
public final java.lang.Object getNewValue()
public final java.lang.Object getOldValue()
public final JSCData getSource()
JSCData
objectpublic final JSCDataEventTypes getType()
JSCDataEventTypes
public java.lang.String toString()
toString
in class java.lang.Object
public static JSCDataEvent valueOfChanged(JSCData source, java.lang.Object oldValue, java.lang.Object newValue)
JSCDataEventTypes.VALUE_CHANGED
.
source
- the source from which the event is firedoldValue
- the value before the changenewValue
- the value after the change
public static JSCDataEvent valueOfEmptyState(JSCData source, boolean isEmptyNow)
JSCDataEventTypes.EMPTY_STATE
.
source
- the source from which the event is firedisEmptyNow
- true
if source is empty
public final boolean isSourceEmpty()
boolean
.
true
if new value is a Boolean
that is true,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |