use of org.eclipse.core.databinding.DataBindingContext in project translationstudio8 by heartsome.
the class TermDbManagerDialog method initDataBindings.
/**
* 初始化数据绑定 将界面与<code>currServer</code>进行绑定
* @return ;
*/
protected void initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
IObservableValue widgetValue = WidgetProperties.text(SWT.Modify).observe(instanceText);
final IObservableValue instanceModelValue = BeanProperties.value("instance").observe(currServer);
bindingContext.bindValue(widgetValue, instanceModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(hostText);
final IObservableValue hostModelValue = BeanProperties.value("host").observe(currServer);
bindingContext.bindValue(widgetValue, hostModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(portText);
final IObservableValue protModelValue = BeanProperties.value("port").observe(currServer);
bindingContext.bindValue(widgetValue, protModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(locationText);
final IObservableValue locationModelValue = BeanProperties.value("itlDBLocation").observe(currServer);
bindingContext.bindValue(widgetValue, locationModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(usernameText);
final IObservableValue usernameModelValue = BeanProperties.value("userName").observe(currServer);
bindingContext.bindValue(widgetValue, usernameModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(passwordText);
final IObservableValue passwordModelValue = BeanProperties.value("password").observe(currServer);
bindingContext.bindValue(widgetValue, passwordModelValue, null, null);
ViewerSupport.bind(dbTableViewer, currServerdbListInput, BeanProperties.values(new String[] { "index", "dbName", "langs" }));
}
use of org.eclipse.core.databinding.DataBindingContext in project translationstudio8 by heartsome.
the class TmDbManagerDialog method initDataBindings.
/**
* 初始化数据绑定 将界面与<code>currServer</code>进行绑定
* @return ;
*/
protected void initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
IObservableValue widgetValue = WidgetProperties.text(SWT.Modify).observe(instanceText);
final IObservableValue instanceModelValue = BeanProperties.value("instance").observe(currServer);
bindingContext.bindValue(widgetValue, instanceModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(hostText);
final IObservableValue hostModelValue = BeanProperties.value("host").observe(currServer);
bindingContext.bindValue(widgetValue, hostModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(portText);
final IObservableValue protModelValue = BeanProperties.value("port").observe(currServer);
bindingContext.bindValue(widgetValue, protModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(locationText);
final IObservableValue locationModelValue = BeanProperties.value("itlDBLocation").observe(currServer);
bindingContext.bindValue(widgetValue, locationModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(usernameText);
final IObservableValue usernameModelValue = BeanProperties.value("userName").observe(currServer);
bindingContext.bindValue(widgetValue, usernameModelValue, null, null);
widgetValue = WidgetProperties.text(SWT.Modify).observe(passwordText);
final IObservableValue passwordModelValue = BeanProperties.value("password").observe(currServer);
bindingContext.bindValue(widgetValue, passwordModelValue, null, null);
ViewerSupport.bind(dbTableViewer, currServerdbListInput, BeanProperties.values(new String[] { "index", "dbName", "langs" }));
}
use of org.eclipse.core.databinding.DataBindingContext in project translationstudio8 by heartsome.
the class View method bindValue.
private void bindValue() {
DataBindingContext dbc = new DataBindingContext();
ConverterUtil.bindValue(dbc, positiveSupportList, positiveConverterViewModel);
ConverterUtil.bindValue(dbc, reverseSupportList, reverseConverterViewModel);
}
use of org.eclipse.core.databinding.DataBindingContext in project translationstudio8 by heartsome.
the class ProjectSettingLanguagePage method initDataBindings.
private void initDataBindings() {
DataBindingContext ctx = new DataBindingContext();
IObservableValue widgetValue = ViewersObservables.observeSingleSelection(srcLangComboViewer);
IObservableValue modelValue = BeanProperties.value(ProjectInfoBean.class, "sourceLang").observe(projCfgBean);
ctx.bindValue(widgetValue, modelValue, null, null);
}
use of org.eclipse.core.databinding.DataBindingContext in project translationstudio8 by heartsome.
the class ConfigConversionDialog method bindValue.
/**
* 对 UI 和 View Model 进行绑定 ;
*/
private void bindValue() {
DataBindingContext dbc = new DataBindingContext();
ConverterUtil.bindValue(dbc, supportList, converterViewModel);
}
Aggregations