|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.miginfocom.property.PropertyHandler
public class PropertyHandler
| Field Summary | |
|---|---|
static boolean |
VALIDATION_EXCEPTIONS
|
| Constructor Summary | |
|---|---|
PropertyHandler()
|
|
| Method Summary | ||
|---|---|---|
static void |
addBeanListener(java.lang.Object bean,
PropertyListener l)
Adds listening to the bean for property changes ion its FieldPropertys. |
|
static void |
addBeanListener(java.lang.Object bean,
java.lang.ref.WeakReference<PropertyListener> wl)
Adds listening to the bean for property changes ion its FieldPropertys. |
|
static
|
addPropertyListener(FieldProperty<T> p,
PropertyListener<T> l)
Adds listening to the property for value changes. |
|
static
|
addPropertyListener(FieldProperty<T> p,
java.lang.ref.WeakReference<PropertyListener<T>> wl)
Adds listening to the property for value changes. |
|
static void |
addValidatorFactory(ValidatorFactory factory)
Adds a factory that will be asked to optionally return a validator for every new property field encountered. |
|
static
|
fireCollectionPropertyChange(CollectionProperty<T> p,
PropertyEvent.Type type,
T removedElement,
T addedElement,
Result result)
|
|
static
|
fireIndexedPropertyChange(ListProperty<T> p,
PropertyEvent.Type type,
T removedElement,
T addedElement,
Result result,
java.lang.Integer ix)
|
|
static
|
fireMapPropertyChange(MapProperty<K,V> p,
PropertyEvent.Type type,
java.util.Map.Entry<K,V> removedElement,
java.util.Map.Entry<K,V> addedElement,
Result result)
|
|
static
|
firePropertyBeanChange(PropertyEvent sourceEvent,
FieldProperty<T> p)
|
|
static
|
firePropertyChange(FieldProperty<T> p,
PropertyEvent.Type type,
T oldValue,
T newValue,
Result result)
|
|
static java.util.ArrayList<? extends Validator> |
getValidators(java.lang.reflect.Field field)
|
|
static boolean |
hasListeners()
Should only be uncommented for unit tests. |
|
static void |
init(java.lang.Object bean)
|
|
static void |
removeBeanListener(java.lang.Object bean,
PropertyListener l)
|
|
static
|
removePropertyListener(FieldProperty<T> p,
PropertyListener<T> l)
|
|
static boolean |
removeValidatorFactory(ValidatorFactory factory)
Adds a factory that will be asked to optionally return a validator for every new property field encountered. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean VALIDATION_EXCEPTIONS
| Constructor Detail |
|---|
public PropertyHandler()
| Method Detail |
|---|
public static final void addValidatorFactory(ValidatorFactory factory)
factory - The factory. Never null.public static final boolean removeValidatorFactory(ValidatorFactory factory)
factory - The factory. Never null.
public static java.util.ArrayList<? extends Validator> getValidators(java.lang.reflect.Field field)
public static <T> void addPropertyListener(FieldProperty<T> p,
PropertyListener<T> l)
The property is held in a weak reference so it will be garbage collected when there are no
more strong references to it. See WeakReference.
p - The property to listen for value changes on.l - The listener to add.
public static <T> void addPropertyListener(FieldProperty<T> p,
java.lang.ref.WeakReference<PropertyListener<T>> wl)
The property is held in a weak reference so it will be garbage collected when there are no
more strong references to it. See WeakReference.
p - The property to listen for value changes on.wl - The listener to add as a WeakReference. It is held in a weak
reference so it will be garbage collected when there are no more strong references to it.
See WeakReference. This means that it the caller needs to keep a strong
reference to it or it will be garbage collected right away.
public static <T> void removePropertyListener(FieldProperty<T> p,
PropertyListener<T> l)
public static void addBeanListener(java.lang.Object bean,
PropertyListener l)
FieldPropertys.
The bean is held in a weak reference so it will be garbage collected when there are no
more strong references to it. See WeakReference.
bean - The bean to listen for property changes on its FieldPropertys.l - The listener to add.
public static void addBeanListener(java.lang.Object bean,
java.lang.ref.WeakReference<PropertyListener> wl)
FieldPropertys.
The bean is held in a weak reference so it will be garbage collected when there are no
more strong references to it. See WeakReference.
bean - The bean to listen for property changes on its FieldPropertys.wl - The listener to add as a WeakReference. It is held in a weak
reference so it will be garbage collected when there are no more strong references to it.
See WeakReference. This means that it the caller needs to keep a strong
reference to it or it will be garbage collected right away.
public static void removeBeanListener(java.lang.Object bean,
PropertyListener l)
public static boolean hasListeners()
public static <T> void firePropertyChange(FieldProperty<T> p,
PropertyEvent.Type type,
T oldValue,
T newValue,
Result result)
public static <T> void firePropertyBeanChange(PropertyEvent sourceEvent,
FieldProperty<T> p)
public static <T> void fireCollectionPropertyChange(CollectionProperty<T> p,
PropertyEvent.Type type,
T removedElement,
T addedElement,
Result result)
public static <K,V> void fireMapPropertyChange(MapProperty<K,V> p,
PropertyEvent.Type type,
java.util.Map.Entry<K,V> removedElement,
java.util.Map.Entry<K,V> addedElement,
Result result)
public static <T> void fireIndexedPropertyChange(ListProperty<T> p,
PropertyEvent.Type type,
T removedElement,
T addedElement,
Result result,
java.lang.Integer ix)
public static void init(java.lang.Object bean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||