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.core.databinding
Class Binding


java.lang.Object
  extended by 

org.eclipse.core.databinding.ValidationStatusProvider
      extended by 
org.eclipse.core.databinding.Binding
Direct Known Subclasses:
ListBinding, SetBinding

public abstract class Binding
extends ValidationStatusProvider

This abstract class represents a binding between a model and a target. Newly created instances need to be added to a data binding context using init(DataBindingContext).

Since:
1.0

Field Summary
protected   DataBindingContext context
           
 
Fields inherited from class org.eclipse.core.databinding. ValidationStatusProvider
disposed
 
Constructor Summary
Binding ( IObservable target, IObservable model)
          Creates a new binding.
 
Method Summary
 void dispose ()
          Disposes of this Binding.
  IObservable getModel ()
          Returns the model observable
  IObservableList getModels ()
          Returns an IObservableList < IObservable > containing the model observables (if any) that are being tracked by this validation status provider.
  IObservable getTarget ()
          Returns the target observable
  IObservableList getTargets ()
          Returns an IObservableList < IObservable > containing the target observables (if any) that are being tracked by this validation status provider.
 void init ( DataBindingContext context)
          Initializes this binding with the given context and adds it to the list of bindings of the context.
protected abstract  void postInit ()
          Called by init(DataBindingContext) after adding this binding to the context.
protected abstract  void preInit ()
          Called by init(DataBindingContext) after setting context but before adding this binding to the context.
abstract  void updateModelToTarget ()
          Updates the target's state from the model's state at the next reasonable opportunity.
abstract  void updateTargetToModel ()
          Updates the model's state from the target's state at the next reasonable opportunity.
abstract  void validateModelToTarget ()
          Validates the model's state at the next reasonable opportunity.
abstract  void validateTargetToModel ()
          Validates the target's state at the next reasonable opportunity.
 
Methods inherited from class org.eclipse.core.databinding. ValidationStatusProvider
getValidationStatus, isDisposed
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected 
DataBindingContext context
Constructor Detail

Binding

public Binding(
IObservable target,
               
IObservable model)
Creates a new binding.

Parameters:
target - target observable
model - model observable
Method Detail

init

public final void init(
DataBindingContext context)
Initializes this binding with the given context and adds it to the list of bindings of the context.

Subclasses may extend, but must call the super implementation.

Parameters:
context -

preInit

protected abstract void preInit()
Called by init(DataBindingContext) after setting context but before adding this binding to the context. Subclasses may use this method to perform initialization that could not be done in the constructor. Care should be taken not to cause any events while running this method.


postInit

protected abstract void postInit()
Called by init(DataBindingContext) after adding this binding to the context. Subclasses may use this method to perform initialization that may cause events to be fired, including BindingEvents that are forwarded to the data binding context.


updateTargetToModel

public abstract void updateTargetToModel()
Updates the model's state from the target's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.


updateModelToTarget

public abstract void updateModelToTarget()
Updates the target's state from the model's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.


validateTargetToModel

public abstract void validateTargetToModel()
Validates the target's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.


validateModelToTarget

public abstract void validateModelToTarget()
Validates the model's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.


dispose

public void dispose()
Disposes of this Binding. Subclasses may extend, but must call super.dispose().

Overrides:
dispose in class ValidationStatusProvider

getTarget

public 
IObservable getTarget()
Returns the target observable

Returns:
the target observable

getTargets

public 
IObservableList getTargets()
Description copied from class: ValidationStatusProvider
Returns an IObservableList < IObservable > containing the target observables (if any) that are being tracked by this validation status provider.

Specified by:
getTargets in class ValidationStatusProvider
Returns:
an IObservableList < IObservable > (may be empty)

getModel

public 
IObservable getModel()
Returns the model observable

Returns:
the model observable

getModels

public 
IObservableList getModels()
Description copied from class: ValidationStatusProvider
Returns an IObservableList < IObservable > containing the model observables (if any) that are being tracked by this validation status provider.

Specified by:
getModels in class ValidationStatusProvider
Returns:
an IObservableList < IObservable > (may be empty)

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