org.eclipse.swt.widgets.Table.addSelectionListener()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(178)

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

Table.addSelectionListener介绍

[英]Adds the listener to the collection of listeners who will be notified when the user changes the receiver's selection, by sending it one of the messages defined in the SelectionListener interface.

When widgetSelected is called, the item field of the event object is valid. If the receiver has the SWT.CHECK style and the check selection changes, the event object detail field contains the value SWT.CHECK. widgetDefaultSelected is typically called when an item is double-clicked. The item field of the event object is valid for default selection, but the detail field is not used.
[中]将侦听器添加到侦听器集合中,当用户更改接收者的选择时,将通过向其发送SelectionListener界面中定义的消息之一来通知这些侦听器。
调用widgetSelected时,事件对象的项目字段有效。如果接收器具有SWT.CHECK样式,并且检查选择发生更改,则事件对象详细信息字段包含值SWT.CHECK。双击项目时通常会调用widgetDefaultSelected。事件对象的“项目”字段对于默认选择有效,但不使用“详细信息”字段。

代码示例

代码示例来源:origin: caoxinyu/RedisClient

table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setHeaderVisible(true);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 2));
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setHeaderVisible(true);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 4));
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 3));
table.setHeaderVisible(true);
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 6));
table.setHeaderVisible(true);
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 6));
table.setHeaderVisible(true);
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: caoxinyu/RedisClient

table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 3));
table.setHeaderVisible(true);
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: pentaho/pentaho-kettle

null, spoon.props );
tableView.table.addSelectionListener( new SelectionAdapter() {
 @Override
 public void widgetSelected( SelectionEvent arg0 ) {

代码示例来源:origin: pentaho/pentaho-kettle

spoon.props );
tableView.table.addSelectionListener( new SelectionAdapter() {
 @Override
 public void widgetSelected( SelectionEvent arg0 ) {

代码示例来源:origin: pentaho/pentaho-kettle

wSteps.table.addSelectionListener( new SelectionAdapter() {

代码示例来源:origin: pentaho/pentaho-kettle

fdServers.bottom = new FormAttachment( wOK, -margin * 2 );
wServers.setLayoutData( fdServers );
wServers.table.addSelectionListener( new SelectionAdapter() {
 public void widgetDefaultSelected( SelectionEvent e ) {
  editSlaveServer();

代码示例来源:origin: pentaho/pentaho-kettle

wFields.setLayoutData( fdFields );
wFields.table.addSelectionListener( new SelectionAdapter() {
 public void widgetSelected( SelectionEvent event ) {
  int index = wFields.getSelectionIndex();

代码示例来源:origin: pentaho/pentaho-kettle

wPackages.table.addSelectionListener( new SelectionAdapter() {
 public void widgetSelected( SelectionEvent e ) {
  refreshGrid();

代码示例来源:origin: caoxinyu/RedisClient

| SWT.MULTI);
mainTabItem.setControl(table);
table.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(SelectionEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

/**
 * Adds a selection listener to the list.
 *
 * @param listener
 *            the selection listener to be added.
 */
public void addSelectionListener(SelectionListener listener) {
  fList.addSelectionListener(listener);
}

代码示例来源:origin: anb0s/LogViewer

public ItemMover(Table table, RuleStore store) {
  this.table = table;
  this.store = store;
  table.addSelectionListener(this);
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

private void createEditors() {
  final Table table = fRepositoryTable.getTable();
  fEnabledColumnEditor = new TableEditor(table);
  fEnabledColumnEditor.horizontalAlignment = SWT.CENTER;
  fEnabledColumnEditor.grabHorizontal = true;
  fEnabledColumnEditor.minimumWidth = 50;
  table.addSelectionListener(widgetSelectedAdapter(e -> showControls()));
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

private void createEditors() {
  final Table table = fRepositoryTable.getTable();
  fEnabledColumnEditor = new TableEditor(table);
  fEnabledColumnEditor.horizontalAlignment = SWT.CENTER;
  fEnabledColumnEditor.grabHorizontal = true;
  fEnabledColumnEditor.minimumWidth = 50;
  table.addSelectionListener(widgetSelectedAdapter(e -> showControls()));
}

相关文章

微信公众号

最新文章

更多

Table类方法