Search in sources :

Example 11 with ValueChangeEvent

use of org.eclipse.core.databinding.observable.value.ValueChangeEvent in project jbosstools-openshift by jbosstools.

the class BaseConnectionEditor method addSelectedConnectionChangedListener.

private IValueChangeListener addSelectedConnectionChangedListener(final IObservableValue selectedConnection, final DataBindingContext dbc) {
    IValueChangeListener listener = new IValueChangeListener() {

        @Override
        public void handleValueChange(ValueChangeEvent event) {
            onSelectedConnectionChanged(selectedConnection);
            DataBindingUtils.validateTargetsToModels(dbc);
        }
    };
    selectedConnection.addValueChangeListener(listener);
    return listener;
}
Also used : IValueChangeListener(org.eclipse.core.databinding.observable.value.IValueChangeListener) ValueChangeEvent(org.eclipse.core.databinding.observable.value.ValueChangeEvent)

Aggregations

IValueChangeListener (org.eclipse.core.databinding.observable.value.IValueChangeListener)11 ValueChangeEvent (org.eclipse.core.databinding.observable.value.ValueChangeEvent)11 Composite (org.eclipse.swt.widgets.Composite)6 IObservableValue (org.eclipse.core.databinding.observable.value.IObservableValue)5 DataBindingContext (org.eclipse.core.databinding.DataBindingContext)3 MultiValidator (org.eclipse.core.databinding.validation.MultiValidator)3 Shell (org.eclipse.swt.widgets.Shell)3 IStatus (org.eclipse.core.runtime.IStatus)2 Button (org.eclipse.swt.widgets.Button)2 Connection (org.jboss.tools.openshift.core.connection.Connection)2 ConnectionWizardPageModel (org.jboss.tools.openshift.internal.common.ui.connection.ConnectionWizardPageModel)2 Iterator (java.util.Iterator)1 Binding (org.eclipse.core.databinding.Binding)1 UpdateValueStrategy (org.eclipse.core.databinding.UpdateValueStrategy)1 ValidationStatusProvider (org.eclipse.core.databinding.ValidationStatusProvider)1 BeanProperties (org.eclipse.core.databinding.beans.BeanProperties)1 ChangeEvent (org.eclipse.core.databinding.observable.ChangeEvent)1 IChangeListener (org.eclipse.core.databinding.observable.IChangeListener)1 IObservable (org.eclipse.core.databinding.observable.IObservable)1 IStaleListener (org.eclipse.core.databinding.observable.IStaleListener)1