Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.databinding.swt
Class WidgetValueProperty


java.lang.Object
  extended by org.eclipse.core.databinding.property.value.ValueProperty
      extended by org.eclipse.core.databinding.property.value.SimpleValueProperty
          extended by 
org.eclipse.jface.databinding.swt.WidgetValueProperty
All Implemented Interfaces:
org.eclipse.core.databinding.property.IProperty, org.eclipse.core.databinding.property.value.IValueProperty, IWidgetValueProperty

public abstract class WidgetValueProperty
extends org.eclipse.core.databinding.property.value.SimpleValueProperty
implements IWidgetValueProperty

Abstract value property implementation for Widget properties. This class implements some basic behavior that widget properties are generally expected to have, namely:

  • Calling observe(Object) should create the observable on the display realm of the widget, rather than the current default realm
  • All observe() methods should return an ISWTObservableValue
This class also provides a default widget listener implementation using SWT's 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.

Since:
1.3

Constructor Summary
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.
 
Method Summary
 org.eclipse.core.databinding.property.INativePropertyListener adaptListener (org.eclipse.core.databinding.property.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)
           
 
Methods inherited from class org.eclipse.core.databinding.property.value.SimpleValueProperty
doGetValue, doSetValue, getValue, observeDetail, observeDetail, observeDetail, setValue
 
Methods inherited from class org.eclipse.core.databinding.property.value.ValueProperty
list, map, observeDetail, set, value, valueFactory, valueFactory
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.databinding.property.value.IValueProperty
getValueType, list, map, observeDetail, observeDetail, observeDetail, observeDetail, set, value, valueFactory, valueFactory
 

Constructor Detail

WidgetValueProperty

protected WidgetValueProperty()
Constructs a WidgetValueProperty which does not listen for any SWT events.


WidgetValueProperty

protected WidgetValueProperty(int changeEvent)
Constructs a WidgetValueProperty with the specified SWT event type

Parameters:
changeEvent - SWT event type constant of the event that signifies a property change.

WidgetValueProperty

protected WidgetValueProperty(int[] changeEvents)
Constructs a WidgetValueProperty with the specified SWT event type(s).

Parameters:
changeEvents - array of SWT event type constants of the events that signify a property change.

WidgetValueProperty

public WidgetValueProperty(int[] changeEvents,
                           int[] staleEvents)
Constructs a WidgetValueProperty with the specified SWT event types.

Parameters:
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.
Method Detail

adaptListener

public org.eclipse.core.databinding.property.INativePropertyListener adaptListener(org.eclipse.core.databinding.property.ISimplePropertyListener listener)
Description copied from class: org.eclipse.core.databinding.property.value.SimpleValueProperty
Returns a listener capable of adding or removing itself as a listener on a source object using the the source's "native" listener API. Events received from the source objects are parlayed to the specified listener argument.

This method returns null if the source object has no listener APIs for this property.

Specified by:
adaptListener in class org.eclipse.core.databinding.property.value.SimpleValueProperty
Parameters:
listener - the property listener to receive events
Returns:
a native listener which parlays property change events to the specified listener, or null if the source object has no listener APIs for this property.

observe

public 
IObservableValue observe(
Object source)
Description copied from interface: org.eclipse.core.databinding.property.value.IValueProperty
Returns an observable value observing this value property on the given property source.

Specified by:
observe in interface org.eclipse.core.databinding.property.value.IValueProperty
Overrides:
observe in class org.eclipse.core.databinding.property.value.ValueProperty
Parameters:
source - the property source
Returns:
an observable value observing this value property on the given property source

observe

public 
IObservableValue observe(
Realm realm,
                                
Object source)
Description copied from interface: org.eclipse.core.databinding.property.value.IValueProperty
Returns an observable value observing this value property on the given property source

Specified by:
observe in interface org.eclipse.core.databinding.property.value.IValueProperty
Overrides:
observe in class org.eclipse.core.databinding.property.value.SimpleValueProperty
Parameters:
realm - the observable's realm
source - the property source
Returns:
an observable value observing this value property on the given property source

wrapObservable

protected 
ISWTObservableValue wrapObservable(
IObservableValue observable,
                                             
Widget widget)

observe

public 
ISWTObservableValue observe(
Widget widget)
Description copied from interface: IWidgetValueProperty
Returns an ISWTObservableValue observing this value property on the given widget

Specified by:
observe in interface IWidgetValueProperty
Parameters:
widget - the source widget
Returns:
an observable value observing this value property on the given widget

observeDelayed

public 
ISWTObservableValue observeDelayed(int delay,
                                          
Widget widget)
Description copied from interface: IWidgetValueProperty
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).

This method is equivalent to SWTObservables.observeDelayedValue(delay, observe(widget)).

Specified by:
observeDelayed in interface IWidgetValueProperty
Parameters:
delay - the delay in milliseconds.
widget - the source widget
Returns:
an observable value observing this value property on the given widget, and which delays change notifications for delay milliseconds.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire