当前位置: 首页>>代码示例>>Java>>正文


Java PojoObservables类代码示例

本文整理汇总了Java中org.eclipse.core.databinding.beans.PojoObservables的典型用法代码示例。如果您正苦于以下问题:Java PojoObservables类的具体用法?Java PojoObservables怎么用?Java PojoObservables使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PojoObservables类属于org.eclipse.core.databinding.beans包,在下文中一共展示了PojoObservables类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bind

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
public static Collection<Binding> bind ( final DataBindingContext dbc, final IObservableValue lineInputObservable, final IObservableValue linePropertiesObservable )
{
    final Collection<Binding> result = new LinkedList<Binding> ();

    try
    {
        result.add ( dbc.bindValue ( PojoObservables.observeDetailValue ( lineInputObservable, "lineWidth", null ), EMFObservables.observeDetailValue ( dbc.getValidationRealm (), linePropertiesObservable, ChartPackage.Literals.LINE_PROPERTIES__WIDTH ) ) ); //$NON-NLS-1$
        result.add ( dbc.bindValue ( PojoObservables.observeDetailValue ( lineInputObservable, "lineColor", null ), EMFObservables.observeDetailValue ( dbc.getValidationRealm (), linePropertiesObservable, ChartPackage.Literals.LINE_PROPERTIES__COLOR ) ) ); //$NON-NLS-1$
    }
    catch ( final Exception e )
    {
        logger.warn ( "Failed to bind line properties", e ); //$NON-NLS-1$
    }

    return result;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:LinePropertiesBinder.java

示例2: XAxisViewer

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
public XAxisViewer ( final DataBindingContext dbc, final ChartRenderer manager, final XAxis axis, final boolean top )
{
    super ( dbc, manager, axis );

    this.axis = axis;

    this.control = new org.eclipse.scada.chart.XAxis ();

    this.renderer = new XAxisDynamicRenderer ( manager );
    this.renderer.setAxis ( this.control );
    this.renderer.setAlign ( top ? SWT.TOP : SWT.BOTTOM );
    manager.addRenderer ( this.renderer, -2 );

    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "label" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__LABEL ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "min" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.XAXIS__MINIMUM ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "max" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.XAXIS__MAXIMUM ) ) ); //$NON-NLS-1$

    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "showLabels" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__LABEL_VISIBLE ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "format" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__FORMAT ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "textPadding" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__TEXT_PADDING ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "color" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__COLOR ) ) ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:XAxisViewer.java

示例3: YAxisViewer

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
public YAxisViewer ( final DataBindingContext dbc, final ChartRenderer manager, final YAxis axis, final boolean left )
{
    super ( dbc, manager, axis );

    this.axis = axis;

    this.control = new org.eclipse.scada.chart.YAxis ();

    this.renderer = new YAxisDynamicRenderer ( manager );
    this.renderer.setAxis ( this.control );
    this.renderer.setAlign ( left ? SWT.LEFT : SWT.RIGHT );
    manager.addRenderer ( this.renderer, -1 );

    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "label" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__LABEL ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "min" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.YAXIS__MINIMUM ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( BeansObservables.observeValue ( this.control, "max" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.YAXIS__MAXIMUM ) ) ); //$NON-NLS-1$

    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "showLabels" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__LABEL_VISIBLE ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "format" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__FORMAT ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "textPadding" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__TEXT_PADDING ) ) ); //$NON-NLS-1$
    addBinding ( this.dbc.bindValue ( PojoObservables.observeValue ( this.renderer, "color" ), EMFObservables.observeValue ( this.axis, ChartPackage.Literals.AXIS__COLOR ) ) ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:YAxisViewer.java

示例4: 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 ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:DataItemLabel.java

示例5: createDialogArea

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite cmp = (Composite) super.createDialogArea(parent);
	cmp.setLayout(new GridLayout(5, false));

	DataBindingContext bindingContext = new DataBindingContext();

	new Label(cmp, SWT.NONE).setText(Messages.CreateParameterCommand_parameter_name);

	Combo operator = new Combo(cmp, SWT.READ_ONLY);
	JRDesignDataset ds = value.getRoot().getValue();
	List<JRParameter> prms = ds.getParametersList();
	String[] items = new String[prms.size()];
	for (int i = 0; i < items.length; i++)
		items[i] = prms.get(i).getName();
	operator.setItems(items);
	operator.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));

	bindingContext.bindValue(SWTObservables.observeSelection(operator), PojoObservables.observeValue(this, "prm")); //$NON-NLS-1$
	return cmp;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:EditPNotExpressionDialog.java

示例6: createWidget

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected void createWidget(Composite parent) {
	GridLayout layout = new GridLayout(2, false);
	layout.marginHeight = 2;
	layout.marginWidth = 0;
	layout.horizontalSpacing = 0;
	layout.verticalSpacing = 0;
	setLayout(layout);

	txt = new Text(this, SWT.BORDER);
	txt.setText(getValue().toSQLString());
	txt.setToolTipText(getValue().toSQLString());
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.minimumWidth = 250;
	txt.setLayoutData(gd);

	DataBindingContext bindingContext = new DataBindingContext();
	bindingContext.bindValue(SWTObservables.observeText(txt, SWT.Modify), PojoObservables.observeValue(getValue(), "value")); //$NON-NLS-1$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:UnknownOperandWidget.java

示例7: createWidget

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected void createWidget(Composite parent) {
	GridLayout layout = new GridLayout(2, false);
	layout.marginHeight = 2;
	layout.marginWidth = 0;
	layout.horizontalSpacing = 0;
	layout.verticalSpacing = 0;
	setLayout(layout);

	txt = new Text(this, SWT.BORDER);
	txt.setText(getValue().toSQLString());
	txt.setToolTipText(getValue().toSQLString());
	GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
	gd.widthHint = 100;
	txt.setLayoutData(gd);

	DataBindingContext bindingContext = new DataBindingContext();

	bindingContext.bindValue(SWTObservables.observeText(txt, SWT.Modify), PojoObservables.observeValue(getValue(), "value"));

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:NumberWidget.java

示例8: createWidget

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected void createWidget(Composite parent) {
	GridLayout layout = new GridLayout(2, false);
	layout.marginHeight = 2;
	layout.marginWidth = 0;
	layout.horizontalSpacing = 0;
	layout.verticalSpacing = 0;
	setLayout(layout);

	txt = new Text(this, SWT.BORDER);
	txt.setText(getValue().toSQLString());
	txt.setToolTipText(getValue().toSQLString());
	txt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	DataBindingContext bindingContext = new DataBindingContext();
	bindingContext.bindValue(SWTObservables.observeText(txt, SWT.Modify), PojoObservables.observeValue(getValue(), "value")); //$NON-NLS-1$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:StringWidget.java

示例9: bindAWS

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
private void bindAWS() {
	List<ResourceProperty> props = res.getValue().getProperties();

	ResourceProperty resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_ACCESS_KEY, props);
	if (resprop != null)
		bAccessKey = bindingContext.bindValue(SWTObservables.observeText(awsAccessKey, SWT.Modify), PojoObservables.observeValue(resprop, "value"));

	resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_SECRET_KEY, props);
	if (resprop != null)
		bSecretKey = bindingContext.bindValue(SWTObservables.observeText(awsSecretKey, SWT.Modify), PojoObservables.observeValue(resprop, "value"));

	resprop = ResourceDescriptorUtil.getProperty(MRDatasourceAWS.PROP_DATASOURCE_AWS_ROLE_ARN, props);

	if (resprop != null)
		bArn = bindingContext.bindValue(SWTObservables.observeText(awsArn, SWT.Modify), PojoObservables.observeValue(resprop, "value"));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:DatasourceAWSPageContent.java

示例10: createContent

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
public Control createContent(Composite parent) {
	Composite cmp = new Composite(parent, SWT.NONE);
	cmp.setLayout(new GridLayout(2, false));

	UIUtil.createLabel(cmp, "Catalog");

	Text tCatalog = new Text(cmp, SWT.BORDER);
	tCatalog.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	List<ResourceProperty> props = res.getValue().getProperties();
	ResourceProperty resprop = ResourceDescriptorUtil.getProperty(ResourceDescriptor.PROP_XMLA_CATALOG, props);

	bindingContext.bindValue(SWTObservables.observeText(tCatalog, SWT.Modify), PojoObservables.observeValue(resprop, "value"));

	Control c = super.createContent(cmp);
	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.horizontalSpan = 2;
	c.setLayoutData(gd);
	return cmp;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:MondrianXMLADefinitionContent.java

示例11: bind

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
protected void bind() {
	bindingContext.bindValue(SWTObservables.observeText(tparent, SWT.NONE),
			PojoObservables.observeValue(res.getValue(), "parentFolder"));

	bindingContext.bindValue(SWTObservables.observeText(tid, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "name"));

	bindingContext.bindValue(SWTObservables.observeText(tcdate, SWT.NONE),
			PojoObservables.observeValue(res.getValue(), "creationDate"));

	bindingContext.bindValue(SWTObservables.observeText(ttype, SWT.NONE),
			PojoObservables.observeValue(res.getValue(), "wsType"));

	bindingContext.bindValue(SWTObservables.observeText(tname, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "label"));
	bindingContext.bindValue(SWTObservables.observeText(tdesc, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "description"));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:CommonSection.java

示例12: bind

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
protected void bind() {
	bindingContext.bindValue(
			SWTObservables.observeText(tpattern, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "pattern"));
	bindingContext.bindValue(SWTObservables.observeText(tmin, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "minValue"));
	bindingContext.bindValue(SWTObservables.observeText(tmax, SWT.Modify),
			PojoObservables.observeValue(res.getValue(), "maxValue"));
	bindingContext.bindValue(SWTObservables.observeSelection(bmin),
			PojoObservables.observeValue(res.getValue(), "strictMin"));
	bindingContext.bindValue(SWTObservables.observeSelection(bmax),
			PojoObservables.observeValue(res.getValue(), "strictMax"));

	bindingContext.bindValue(SWTObservables
			.observeSingleSelectionIndex(ttype), PojoObservables
			.observeValue(getProxy(res.getValue()), "dataType"));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:DataTypeSection.java

示例13: bindWidgets

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected void bindWidgets(DataAdapter dataAdapter) {
	JdbcDataAdapter jdbcDataAdapter = (JdbcDataAdapter) dataAdapter;

	String driverName = Misc.nvl(jdbcDataAdapter.getDriver(), "org.hsqldb.jdbcDriver"); //$NON-NLS-1$
	comboJDBCDriver.getCombo().setText(driverName);

	for (JDBCDriverDefinition d : definitions) {
		if (d.getDriverName().equals(driverName)) {
			currentdriver = d;
			break;
		}
	}

	bindingContext.bindValue(SWTObservables.observeText(textUsername, SWT.Modify), PojoObservables.observeValue(dataAdapter, "username")); //$NON-NLS-1$
	bindingContext.bindValue(SWTObservables.observeText(textPassword, SWT.Modify), PojoObservables.observeValue(dataAdapter, "password")); //$NON-NLS-1$
	bindURLAssistant(dataAdapter);
	bindingContext.bindValue(SWTObservables.observeText(textJDBCUrl, SWT.Modify), PojoObservables.observeValue(dataAdapter, "url")); //$NON-NLS-1$

	cpath.setClasspaths(jdbcDataAdapter.getClasspath());
	cproperties.setProperties(jdbcDataAdapter.getProperties());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:JDBCDataAdapterComposite.java

示例14: bindWidgets

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected void bindWidgets(DataAdapter dataAdapter) {
	BeanDataAdapter bda = (BeanDataAdapter) dataAdapter;

	bindingContext.bindValue(SWTObservables.observeText(
			factoryText.getControl(), SWT.Modify), PojoObservables
			.observeValue(dataAdapter, "factoryClass")); //$NON-NLS-1$

	bindingContext.bindValue(
			SWTObservables.observeText(methodText, SWT.Modify),
			PojoObservables.observeValue(dataAdapter, "methodName")); //$NON-NLS-1$
	bindingContext.bindValue(SWTObservables.observeSelection(useFDcheck),
			PojoObservables
					.observeValue(dataAdapter, "useFieldDescription")); //$NON-NLS-1$

	cpath.setClasspaths(bda.getClasspath());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:BeanDataAdapterComposite.java

示例15: createContents

import org.eclipse.core.databinding.beans.PojoObservables; //导入依赖的package包/类
@Override
protected Control createContents(Composite parent) {
	Control control = super.createContents(parent);

	DataBindingContext binding = new DataBindingContext();

	ControlDecoration controlDecoration = new ControlDecoration(tname, SWT.LEFT | SWT.TOP);
	controlDecoration.setDescriptionText(Messages.ThemesPreferencePage_duplicateName);
	FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
			FieldDecorationRegistry.DEC_ERROR);
	controlDecoration.setImage(fieldDecoration.getImage());

	binding.bindValue(SWTObservables.observeText(tname, SWT.Modify), PojoObservables.observeValue(this, "themename"), //$NON-NLS-1$
			new UpdateValueStrategy().setAfterConvertValidator(new StringRequiredValidator(Messages.ThemesPreferencePage_enternameMessage,
					controlDecoration, getButton(IDialogConstants.OK_ID))), null);

	return control;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:ThemesPreferencePage.java


注:本文中的org.eclipse.core.databinding.beans.PojoObservables类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。