Enum IPropReference.ReferenceChangeEvent
- java.lang.Object
- java.lang.Enum<IPropReference.ReferenceChangeEvent>
- com.iizix.prop.IPropReference.ReferenceChangeEvent
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IPropReference.ReferenceChangeEvent>
- Enclosing interface:
- IPropReference
public static enum IPropReference.ReferenceChangeEvent extends java.lang.Enum<IPropReference.ReferenceChangeEvent>
Enumeration for reference change events.
Enum Constant Summary
Enum Constants Enum Constant Description BROKEN
Event fired whenPropReference.resolve(doReCheck=true)
is called and the check fails to find the property that it previously had a reference to, no matter if it was of correct property class.DISPOSED
The property has been disposed of and as such the referencer stops listening to it.FOUND
This event is sent when the referenced property has been found, thus its reference resolved.FOUND_WRONG_CLASS
This event is sent when the referenced property has been found, thus its reference resolved, but the property class is not matching.MOVED
The property has been moved from it's container and as such the listener may check if it is still valid (e.g.RENAMED
Property has been renamed, thus the reference name has changed.
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IPropReference.ReferenceChangeEvent
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static IPropReference.ReferenceChangeEvent[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Enum Constant Detail
FOUND
public static final IPropReference.ReferenceChangeEvent FOUND
This event is sent when the referenced property has been found, thus its reference resolved. From then on, a property listener is added to the property to track it for name change, move, remove, dispose, as all these actions changes the referencing to the property.Note that this event can very well have a new Java reference to the property, so be sure to get the instance using
PropReference.getProperty()
.This event is not fired when calling resolve(false) and the property already has been found, or when calling resolve(true) and the Java reference instance remains the same.
FOUND_WRONG_CLASS
public static final IPropReference.ReferenceChangeEvent FOUND_WRONG_CLASS
This event is sent when the referenced property has been found, thus its reference resolved, but the property class is not matching. No property listener is used to keep track of it, the reference name should probably be corrected by the user in the Designer.Note that this event can very well have a new Java reference to the property, so be sure to get the instance using
PropReference.getProperty()
.This event is not fired when calling resolve(false) and the property already has been found, or when calling resolve(true) and the Java reference instance remains the same.
BROKEN
public static final IPropReference.ReferenceChangeEvent BROKEN
Event fired whenPropReference.resolve(doReCheck=true)
is called and the check fails to find the property that it previously had a reference to, no matter if it was of correct property class.Any potential property listener previously set is removed prior to firing this event.
RENAMED
public static final IPropReference.ReferenceChangeEvent RENAMED
Property has been renamed, thus the reference name has changed. The reference name has been updated prior to firing this event.This event is fired only when the reference has been found.
The event listener is still active after this event.
MOVED
public static final IPropReference.ReferenceChangeEvent MOVED
The property has been moved from it's container and as such the listener may check if it is still valid (e.g. wrong project or invalid path). The reference name has been updated prior to firing this event.This event is fired only when the reference has been found.
The event listener is still active after this event.
DISPOSED
public static final IPropReference.ReferenceChangeEvent DISPOSED
The property has been disposed of and as such the referencer stops listening to it. This event only occurs if a parent of the referenced property is removed, thus theREMOVED
event is not fired.This event is fired only when the reference has been found.
The event may be sent again if a connection is re-established due to a successful call to
PropReference.resolve()
.
Method Detail
values
public static IPropReference.ReferenceChangeEvent[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IPropReference.ReferenceChangeEvent c : IPropReference.ReferenceChangeEvent.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static IPropReference.ReferenceChangeEvent valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null