public abstract class WidgetValueProperty extends SimpleValueProperty implements IWidgetValueProperty
Widget
properties. This
class implements some basic behavior that widget properties are generally
expected to have, namely:
observe(Object)
should create the observable on the
display realm of the widget, rather than the current default realm
observe()
methods should return an
ISWTObservableValue
untyped listener API
. Subclasses may pass one or more SWT
event type constants to the super constructor to indicate which events signal
a property change.Modifier | Constructor and Description |
---|---|
protected |
WidgetValueProperty()
Constructs a WidgetValueProperty which does not listen for any SWT
events.
|
protected |
WidgetValueProperty(int changeEvent)
Constructs a WidgetValueProperty with the specified SWT event type
|
protected |
WidgetValueProperty(int[] changeEvents)
Constructs a WidgetValueProperty with the specified SWT event type(s).
|
|
WidgetValueProperty(int[] changeEvents,
int[] staleEvents)
Constructs a WidgetValueProperty with the specified SWT event types.
|
Modifier and Type | Method and Description |
---|---|
INativePropertyListener |
adaptListener(ISimplePropertyListener listener)
Returns a listener capable of adding or removing itself as a listener on
a source object using the the source's "native" listener API.
|
IObservableValue |
observe(Object source)
Returns an observable value observing this value property on the given
property source.
|
IObservableValue |
observe(Realm realm,
Object source)
Returns an observable value observing this value property on the given
property source
|
ISWTObservableValue |
observe(Widget widget)
Returns an
ISWTObservableValue observing this value property on
the given widget |
ISWTObservableValue |
observeDelayed(int delay,
Widget widget)
Returns an
ISWTObservableValue observing this value property on
the given widget, which delays notification of value changes until at
least delay milliseconds have elapsed since that last change
event, or until a FocusOut event is received from the widget (whichever
happens first). |
protected ISWTObservableValue |
wrapObservable(IObservableValue observable,
Widget widget) |
doGetValue, doSetValue, observeDetail, observeDetail, observeDetail
getValue, list, map, observeDetail, set, setValue, value, valueFactory, valueFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue, getValueType, list, map, observeDetail, observeDetail, observeDetail, observeDetail, set, setValue, value, valueFactory, valueFactory
protected WidgetValueProperty()
protected WidgetValueProperty(int changeEvent)
changeEvent
- SWT event type constant of the event that signifies a property
change.protected WidgetValueProperty(int[] changeEvents)
changeEvents
- array of SWT event type constants of the events that signify a
property change.public WidgetValueProperty(int[] changeEvents, int[] staleEvents)
changeEvents
- array of SWT event type constants of the events that signify a
property change.staleEvents
- array of SWT event type constants of the events that signify a
property became stale.public INativePropertyListener adaptListener(ISimplePropertyListener listener)
SimpleValueProperty
This method returns null if the source object has no listener APIs for this property.
adaptListener
in class SimpleValueProperty
listener
- the property listener to receive eventspublic IObservableValue observe(Object source)
IValueProperty
observe
in interface IValueProperty
observe
in class ValueProperty
source
- the property sourcepublic IObservableValue observe(Realm realm, Object source)
IValueProperty
observe
in interface IValueProperty
observe
in class SimpleValueProperty
realm
- the observable's realmsource
- the property sourceprotected ISWTObservableValue wrapObservable(IObservableValue observable, Widget widget)
public ISWTObservableValue observe(Widget widget)
IWidgetValueProperty
ISWTObservableValue
observing this value property on
the given widgetobserve
in interface IWidgetValueProperty
widget
- the source widgetpublic ISWTObservableValue observeDelayed(int delay, Widget widget)
IWidgetValueProperty
ISWTObservableValue
observing this value property on
the given widget, which delays notification of value changes until at
least delay
milliseconds have elapsed since that last change
event, or until a FocusOut event is received from the widget (whichever
happens first).
This method is equivalent to
SWTObservables.observeDelayedValue(delay, observe(widget))
.
observeDelayed
in interface IWidgetValueProperty
delay
- the delay in milliseconds.widget
- the source widgetdelay
milliseconds.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.