List of usage examples for org.eclipse.jface.databinding.swt SWTObservables observeForeground
@Deprecated public static ISWTObservableValue observeForeground(Control control)
From source file:com.rcpcompany.uibindings.uiAttributes.SimpleUIAttribute.java
License:Open Source License
@Override public IObservableValue getForegroundValue() { Assert.isTrue(!isDisposed());/* ww w . ja va2s . co m*/ if (myWidget instanceof Control) { final Control c = (Control) myWidget; return addObservable(SWTObservables.observeForeground(c)); } return null; }
From source file:org.reap.internal.core.binding.BindingManager.java
License:Open Source License
private IObservable createSWTObservable(final Control control, final BindingConfig binding) { IObservable obs = null;//from www .jav a2 s . c o m switch (binding.getType()) { case BACKGROUND: obs = SWTObservables.observeBackground(control); break; case EDITABLE: obs = SWTObservables.observeEditable(control); break; case ENABLED: obs = SWTObservables.observeEnabled(control); break; case FONT: obs = SWTObservables.observeFont(control); break; case FOREGROUND: obs = SWTObservables.observeForeground(control); break; case ITEMS: obs = SWTObservables.observeItems(control); break; case MAX: obs = SWTObservables.observeMax(control); break; case MIN: obs = SWTObservables.observeMin(control); break; case SELECTION: obs = SWTObservables.observeSelection(control); break; case SINGLESELECTIONINDEX: obs = SWTObservables.observeSingleSelectionIndex(control); break; case TEXT: obs = SWTObservables.observeText(control); break; case TEXTFOCUSOUT: obs = SWTObservables.observeText(control, SWT.FocusOut); break; case TEXTMODIFY: obs = SWTObservables.observeText(control, SWT.Modify); break; case TEXTNONE: obs = SWTObservables.observeText(control, SWT.None); break; case TOOLTIPTEXT: obs = SWTObservables.observeTooltipText(control); break; case VISIBLE: obs = SWTObservables.observeVisible(control); break; default: throw new IllegalArgumentException(); } return obs; }