本文整理汇总了Java中org.eclipse.core.databinding.beans.PojoObservables.observeDetailValue方法的典型用法代码示例。如果您正苦于以下问题:Java PojoObservables.observeDetailValue方法的具体用法?Java PojoObservables.observeDetailValue怎么用?Java PojoObservables.observeDetailValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.databinding.beans.PojoObservables
的用法示例。
在下文中一共展示了PojoObservables.observeDetailValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DataItemLabel
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
public DataItemLabel ( final Composite composite, final String connectionId, final String itemId )
{
this.label = new CLabel ( composite, SWT.NONE );
this.dataItem = new DataItemObservableValue ( Activator.getDefault ().getBundle ().getBundleContext (), connectionId, itemId );
this.label.addDisposeListener ( new DisposeListener () {
@Override
public void widgetDisposed ( final DisposeEvent e )
{
handleDispose ();
}
} );
this.model = PojoObservables.observeDetailValue ( this.dataItem, "value", Variant.class ); //$NON-NLS-1$
this.dbc = new DataBindingContext ();
bind ();
}
示例2: initDataBinding
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void initDataBinding(){
transientCodingValue = new WritableValue();
DataBindingContext bindingContext = new DataBindingContext();
IObservableValue targetObservable = SWTObservables.observeText(codeTxt, SWT.Modify);
IObservableValue modelObservable = PojoObservables.observeDetailValue(transientCodingValue,
"code", TransientCoding.class);
bindingContext.bindValue(targetObservable, modelObservable);
targetObservable = SWTObservables.observeText(displayTxt, SWT.Modify);
modelObservable = PojoObservables.observeDetailValue(transientCodingValue, "display",
TransientCoding.class);
bindingContext.bindValue(targetObservable, modelObservable);
setCoding(null);
}
示例3: initDataBinding
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void initDataBinding(){
transientConditionValue = new WritableValue();
DataBindingContext bindingContext = new DataBindingContext();
IObservableValue targetObservable =
ViewersObservables.observeSingleSelection(statusViewer);
IObservableValue modelObservable = PojoObservables
.observeDetailValue(transientConditionValue, "status", TransientCondition.class);
bindingContext.bindValue(targetObservable, modelObservable);
targetObservable = SWTObservables.observeText(startTxt, SWT.Modify);
modelObservable = PojoObservables.observeDetailValue(transientConditionValue, "start",
TransientCondition.class);
bindingContext.bindValue(targetObservable, modelObservable);
targetObservable = SWTObservables.observeText(endTxt, SWT.Modify);
modelObservable = PojoObservables.observeDetailValue(transientConditionValue, "end",
TransientCondition.class);
bindingContext.bindValue(targetObservable, modelObservable);
targetObservable = SWTObservables.observeText(textTxt, SWT.Modify);
modelObservable =
PojoObservables.observeDetailValue(transientConditionValue, "text",
TransientCondition.class);
bindingContext.bindValue(targetObservable, modelObservable);
setCondition(null);
}
示例4: bindValue
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void bindValue(Text text, String property, DataBindingContext bindingContext) {
IObservableValue textObserveWidget = SWTObservables.observeDelayedValue(5,
SWTObservables.observeText(text, SWT.Modify));
IObservableValue observeValue = PojoObservables.observeDetailValue(patientObservable, property, String.class);
bindingContext.bindValue(textObserveWidget, observeValue, null, null);
}