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

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

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

Tree.sendSelectionEvent介绍

暂无

代码示例

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

void sendTreeDefaultSelection() {

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

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

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

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

void sendTreeDefaultSelection() {

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

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

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

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

@Override
long /*int*/ gtk_changed (long /*int*/ widget) {
  TreeItem 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

@Override
int /*long*/ gtk_changed (int /*long*/ widget) {
  TreeItem 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

void sendTreeDefaultSelection() {

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

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

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

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

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

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

void sendSelection () {
  if (ignoreSelect) return;
  NSOutlineView widget = (NSOutlineView) view;
  int row = (int)/*64*/widget.selectedRow ();
  if (row == -1)
    sendSelectionEvent (SWT.Selection);
  else {
    id _id = widget.itemAtRow (row);
    TreeItem item = (TreeItem) display.getWidget (_id.id);
    Event event = new Event ();
    event.item = item;
    event.index = row;
    sendSelectionEvent (SWT.Selection, event, false);
  }
}

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

void outlineView_setObjectValue_forTableColumn_byItem (long /*int*/ id, long /*int*/ sel, long /*int*/ outlineView, long /*int*/ object, long /*int*/ tableColumn, long /*int*/ itemID) {
  if (checkColumn != null && tableColumn == checkColumn.id)  {
    TreeItem item = (TreeItem) display.getWidget (itemID);
    item.checked = !item.checked;
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
    item.redraw (-1);
  }
}

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

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

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

event.item = _getItem (null, selectedRowIndex, true);
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 = item;
  sendSelectionEvent (SWT.Selection, event, false);
  if ((style & SWT.CHECK) != 0) {
    event = new Event ();
    event.item = item;
    event.detail = SWT.CHECK;
    sendSelectionEvent (SWT.Selection, event, false);
int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem != 0) event.item = _getItem (hItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);
return LRESULT.ZERO;

代码示例来源: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;
  TreeItem item = null;
  int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof());
  if (OS.gtk_tree_model_get_iter (modelHandle, iter, path)) {
    item = _getItem (iter);
  }
  OS.g_free (iter);
  OS.gtk_tree_path_free (path);
  if (item != null) {
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  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;
  TreeItem item = null;
  long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof());
  if (OS.gtk_tree_model_get_iter (modelHandle, iter, path)) {
    item = _getItem (iter);
  }
  OS.g_free (iter);
  OS.gtk_tree_path_free (path);
  if (item != null) {
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  return 0;
}

代码示例来源: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;
  TreeItem item = null;
  int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof());
  if (OS.gtk_tree_model_get_iter (modelHandle, iter, path)) {
    item = _getItem (iter);
  }
  OS.g_free (iter);
  OS.gtk_tree_path_free (path);
  if (item != null) {
    item.setChecked (!item.getChecked ());
    Event event = new Event ();
    event.detail = SWT.CHECK;
    event.item = item;
    sendSelectionEvent (SWT.Selection, event, false);
  }
  return 0;
}

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

event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
  event.detail = SWT.CHECK;
  sendSelectionEvent (SWT.Selection, event, false);
  return LRESULT.ZERO;
Event event = new Event ();
event.item = _getItem (lpht.hItem);
sendSelectionEvent (SWT.DefaultSelection, event, false);

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

Event event = new Event ();
event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);

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

Event event = new Event ();
  event.item = _getItem (lpht.hItem);
  sendSelectionEvent (SWT.Selection, event, false);
  event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
  event.detail = SWT.CHECK;
  sendSelectionEvent (SWT.Selection, event, false);
  return LRESULT.ZERO;
Event event = new Event ();
event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);

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

Event event = new Event ();
event.item = _getItem (hNewItem, (int)/*64*/tvItem.lParam);
sendSelectionEvent (SWT.Selection, event, false);
return new LRESULT (code);

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

parent.hAnchor = hNewItem;
parent.sendSelectionEvent (SWT.Selection, event, true);

相关文章

Tree类方法