gpt4 book ai didi

org.eclipse.jface.databinding.swt.WidgetProperties.selection()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 13:51:05 25 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.jface.databinding.swt.WidgetProperties.selection()方法的一些代码示例,展示了WidgetProperties.selection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WidgetProperties.selection()方法的具体详情如下:
包路径:org.eclipse.jface.databinding.swt.WidgetProperties
类名称:WidgetProperties
方法名:selection

WidgetProperties.selection介绍

[英]Returns a value property for observing the selection state of a Button, CCombo, Combo, DateTime, List, MenuItem (since 1.5), Scale, Slider(since 1.5) or Spinner.
[中]返回一个值属性,用于观察按钮、cmbo、组合、日期时间、列表、菜单项(自1.5起)、缩放、滑块(自1.5起)或微调器的选择状态。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.databinding

/**
 * Returns an observable observing the selection attribute of the provided
 * <code>control</code>. The supported types are:
 * <ul>
 * <li>org.eclipse.swt.widgets.Spinner</li>
 * <li>org.eclipse.swt.widgets.Button</li>
 * <li>org.eclipse.swt.widgets.Combo</li>
 * <li>org.eclipse.swt.custom.CCombo</li>
 * <li>org.eclipse.swt.widgets.List</li>
 * <li>org.eclipse.swt.widgets.MenuItem (since 1.5)</li>
 * <li>org.eclipse.swt.widgets.Scale</li>
 * </ul>
 *
 * @param widget
 * @return observable value
 * @throws IllegalArgumentException
 *             if <code>control</code> type is unsupported
 * @since 1.5
 * @deprecated use <code>WidgetProperties</code> instead
 */
@Deprecated
public static ISWTObservableValue observeSelection(Widget widget) {
  return WidgetProperties.selection().observe(widget);
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor.forms.common

public void createStandardCheckbox ( final Composite parent, final String attributeName, final String label, final IObservableMap data, final Object valueType )
{
  final Button button = this.toolkit.createButton ( parent, label, SWT.CHECK );
  {
    final GridData gd = new GridData ( GridData.FILL_HORIZONTAL );
    gd.horizontalSpan = 3;
    button.setLayoutData ( gd );
    final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
    this.dbc.bindValue ( WidgetProperties.selection ().observe ( button ), value );
  }
}

代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor.forms.common

public void createStandardCheckbox ( final Composite parent, final String attributeName, final String label, final IObservableMap data, final Object valueType )
{
  final Button button = this.toolkit.createButton ( parent, label, SWT.CHECK );
  {
    final GridData gd = new GridData ( GridData.FILL_HORIZONTAL );
    gd.horizontalSpan = 3;
    button.setLayoutData ( gd );
    final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
    this.dbc.bindValue ( WidgetProperties.selection ().observe ( button ), value );
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com