|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.beansbinding.Property<S,S>
org.jdesktop.beansbinding.ObjectProperty<S>
S - the type of source object that this Property operates on
and therefore the type of value that it representspublic final class ObjectProperty<S>
An immutable, read-only, Property implementation whose getValue
method returns the source object that it is given. This class is useful when
you want to configure a Binding to use its source object directly,
rather than some property of the source object. For example:
new SomeBindingClass(sourceObject, ObjectProperty.create(), targetObject, targetProperty);
Explicitly using ObjectProperty isn't necessary when creating Bindings
from this package or the SwingBindings package, as the set of static creation
methods include versions that handle this for you.
| Method Summary | ||
|---|---|---|
void |
addPropertyStateListener(S source,
PropertyStateListener listener)
Does nothing; the state of an ObjectProperty never changes so
listeners aren't useful. |
|
static
|
create()
Creates an instance of ObjectProperty. |
|
PropertyStateListener[] |
getPropertyStateListeners(S source)
Returns an empty array; the state of an ObjectProperty never changes
so listeners aren't useful. |
|
S |
getValue(S source)
Returns the source object passed to the method. |
|
java.lang.Class<? extends S> |
getWriteType(S source)
Throws UnsupportedOperationException; ObjectProperty is never writeable. |
|
boolean |
isReadable(java.lang.Object source)
Returns true; ObjectProperty is always readable. |
|
boolean |
isWriteable(java.lang.Object source)
Returns false; ObjectProperty is never writeable. |
|
void |
removePropertyStateListener(S source,
PropertyStateListener listener)
Does nothing; the state of an ObjectProperty never changes so
listeners aren't useful. |
|
void |
setValue(S source,
S value)
Throws UnsupportedOperationException; ObjectProperty is never writeable. |
|
java.lang.String |
toString()
Returns a string representation of the ObjectProperty. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <S> ObjectProperty<S> create()
ObjectProperty.
public java.lang.Class<? extends S> getWriteType(S source)
UnsupportedOperationException; ObjectProperty is never writeable.
getWriteType in class Property<S,S>source - the source object on which to operate
UnsupportedOperationException; ObjectProperty is never writeable
java.lang.UnsupportedOperationException - always; ObjectProperty is never writeableisWriteable(java.lang.Object)public S getValue(S source)
getValue in class Property<S,S>source - the source object on which to operate
source argumentisReadable(java.lang.Object)
public void setValue(S source,
S value)
UnsupportedOperationException; ObjectProperty is never writeable.
setValue in class Property<S,S>source - the source object on which to operatevalue - the new value for the Property
java.lang.UnsupportedOperationException - always; ObjectProperty is never writeableisWriteable(java.lang.Object),
getWriteType(S)public boolean isReadable(java.lang.Object source)
true; ObjectProperty is always readable.
isReadable in class Property<S,S>source - the source object on which to operate
true; ObjectPropert is always readableisWriteable(java.lang.Object)public boolean isWriteable(java.lang.Object source)
false; ObjectProperty is never writeable.
isWriteable in class Property<S,S>source - the source object on which to operate
false; ObjectPropert is never writeableisReadable(java.lang.Object)public java.lang.String toString()
ObjectProperty. This
method is intended to be used for debugging purposes only, and
the content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null.
toString in class java.lang.ObjectObjectProperty
public void addPropertyStateListener(S source,
PropertyStateListener listener)
ObjectProperty never changes so
listeners aren't useful.
addPropertyStateListener in class Property<S,S>source - the source object on which to operatelistener - the listener to be notified
public void removePropertyStateListener(S source,
PropertyStateListener listener)
ObjectProperty never changes so
listeners aren't useful.
removePropertyStateListener in class Property<S,S>source - the source object on which to operatelistener - the listener to be removedaddPropertyStateListener(S, org.jdesktop.beansbinding.PropertyStateListener)public PropertyStateListener[] getPropertyStateListeners(S source)
ObjectProperty never changes
so listeners aren't useful.
getPropertyStateListeners in class Property<S,S>source - the source object on which to operate
addPropertyStateListener(S, org.jdesktop.beansbinding.PropertyStateListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||