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

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

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

Table.sendSelectionEvent介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void sendSelection () {
  if (ignoreSelect) return;
  NSTableView widget = (NSTableView) view;
  int row = (int)/*64*/widget.selectedRow ();
  if(row == -1)
    sendSelectionEvent (SWT.Selection);
  else {
    TableItem item = _getItem (row);
    Event event = new Event ();
    event.item = item;
    event.index = row;
    sendSelectionEvent (SWT.Selection, event, false);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void sendTreeDefaultSelection() {

  //Note, similar DefaultSelectionHandling in SWT List/Table/Tree
  TableItem tableItem = getFocusItem ();
  if (tableItem == null)
    return;

  Event event = new Event ();
  event.item = tableItem;

  sendSelectionEvent (SWT.DefaultSelection, event, false);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void sendTreeDefaultSelection() {

  //Note, similar DefaultSelectionHandling in SWT List/Table/Tree
  TableItem tableItem = getFocusItem ();
  if (tableItem == null)
    return;

  Event event = new Event ();
  event.item = tableItem;

  sendSelectionEvent (SWT.DefaultSelection, event, false);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

void setChecked (boolean checked, boolean notify) {
  this.checked = checked;
  if ((parent.style & SWT.VIRTUAL) != 0) cached = true;
  if (notify) {
    Event event = new Event();
    event.item = this;
    event.detail = SWT.CHECK;
    parent.sendSelectionEvent (SWT.Selection, event, false);
  }
  redraw ();
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void tableView_setObjectValue_forTableColumn_row (long /*int*/ id, long /*int*/ sel, long /*int*/ aTableView, long /*int*/ anObject, long /*int*/ aTableColumn, long /*int*/ rowIndex) {
  if (checkColumn != null && aTableColumn == checkColumn.id)  {
    TableItem item = items [(int)/*64*/rowIndex];
    item.checked = !item.checked;
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    event.index = (int)/*64*/rowIndex;
    sendSelectionEvent (SWT.Selection, event, false);
    item.redraw (-1);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int /*long*/ gtk_changed (int /*long*/ widget) {
  TableItem item = getFocusItem ();
  if (item != null) {
    Event event = new Event ();
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int /*long*/ gtk_changed (int /*long*/ widget) {
  TableItem item = getFocusItem ();
  if (item != null) {
    Event event = new Event ();
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
long /*int*/ gtk_changed (long /*int*/ widget) {
  TableItem item = getFocusItem ();
  if (item != null) {
    Event event = new Event ();
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void sendTreeDefaultSelection() {

  //Note, similar DefaultSelectionHandling in SWT List/Table/Tree
  TableItem tableItem = getFocusItem ();
  if (tableItem == null)
    return;

  Event event = new Event ();
  event.item = tableItem;

  sendSelectionEvent (SWT.DefaultSelection, event, false);
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void sendDoubleSelection() {
  NSTableView tableView = (NSTableView)view;
  int rowIndex = (int)/*64*/tableView.clickedRow (); 
  if (rowIndex == -1) rowIndex = (int)/*64*/tableView.selectedRow(); 
  if (rowIndex != -1) {
    if ((style & SWT.CHECK) != 0) {
      NSArray columns = tableView.tableColumns ();
      int columnIndex = (int)/*64*/tableView.clickedColumn ();
      if (columnIndex != -1) {
        id column = columns.objectAtIndex (columnIndex);
        if (column.id == checkColumn.id) return;
      }
    }
    Event event = new Event ();
    event.item = _getItem (rowIndex);
    sendSelectionEvent (SWT.DefaultSelection, event, false);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) {
  int /*long*/ path = OS.gtk_tree_path_new_from_string (pathStr);
  if (path == 0) return 0;
  int /*long*/ indices = OS.gtk_tree_path_get_indices (path);
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    TableItem item = _getItem (index [0]);
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  OS.gtk_tree_path_free (path);
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
long /*int*/ gtk_toggled (long /*int*/ renderer, long /*int*/ pathStr) {
  long /*int*/ path = OS.gtk_tree_path_new_from_string (pathStr);
  if (path == 0) return 0;
  long /*int*/ indices = OS.gtk_tree_path_get_indices (path);
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    TableItem item = _getItem (index [0]);
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  OS.gtk_tree_path_free (path);
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) {
  int /*long*/ path = OS.gtk_tree_path_new_from_string (pathStr);
  if (path == 0) return 0;
  int /*long*/ indices = OS.gtk_tree_path_get_indices (path);
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    TableItem item = _getItem (index [0]);
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  OS.gtk_tree_path_free (path);
  return 0;
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

event.item = _getItem ((int)/*64*/selectedRowIndex);
selectedRowIndex = -1;
sendSelectionEvent (SWT.Selection, event, false);
ignoreSelect = true;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

Event event = new Event ();
event.item = _getItem (index);
sendSelectionEvent (SWT.DefaultSelection, event, false);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
if (index != -1) event.item = _getItem (index);
sendSelectionEvent (SWT.Selection, event, false);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

Event event = new Event ();
event.item = _getItem (pnmlv.iItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);

相关文章

Table类方法