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

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

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

Tree.notifyListeners介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private void updateSelection() {
 TreeItem[] selection = parent.getSelection();
 List<TreeItem> selectedItems = new ArrayList<>( Arrays.asList( selection ) );
 if( deselectChildren( selectedItems ) ) {
  if( ( parent.getStyle() & SWT.SINGLE ) != 0 ) {
   selectedItems.add( this );
  }
  parent.setSelection( selectedItems.toArray( new TreeItem[ 0 ] ) );
  Event event = new Event();
  event.item = this;
  parent.notifyListeners( SWT.Selection, event );
 }
}

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.converter

protected void setCheck(TreeItem item, boolean check)
{
 if (item.getChecked() != check)
 {
  item.setChecked(check);        
  tree.notifyListeners(SWT.Selection, createCheckEvent(item));
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifySelection( Tree tree, JsonObject properties ) {
 TreeItem item = getItem( tree, properties.get( EVENT_PARAM_ITEM ).asString() );
 if( item != null ) {
  Event event = createSelectionEvent( SWT.Selection, properties );
  event.item = item;
  tree.notifyListeners( SWT.Selection, event );
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyCollapse( Tree tree, JsonObject properties ) {
 TreeItem item = getItem( tree, properties.get( EVENT_PARAM_ITEM ).asString() );
 if( item != null ) {
  Event event = new Event();
  event.item = item;
  tree.notifyListeners( SWT.Collapse, event );
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyDefaultSelection( Tree tree, JsonObject properties ) {
 Event event = createSelectionEvent( SWT.DefaultSelection, properties );
 event.item = getItem( tree, properties.get( EVENT_PARAM_ITEM ).asString() );
 tree.notifyListeners( SWT.DefaultSelection, event );
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public void handleNotifyExpand( Tree tree, JsonObject properties ) {
 TreeItem item = getItem( tree, properties.get( EVENT_PARAM_ITEM ).asString() );
 if( item != null ) {
  Event event = new Event();
  event.item = item;
  tree.notifyListeners( SWT.Expand, event );
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

final boolean checkData( TreeItem item, int index ) {
 boolean result = true;
 if( isVirtual() && !item.isCached() ) {
  item.markCached();
  Event event = new Event();
  event.item = item;
  event.index = index;
  notifyListeners( SWT.SetData, event );
  // widget could be disposed at this point
  if( isDisposed() || item.isDisposed() ) {
   result = false;
  }
 }
 return result;
}

代码示例来源:origin: org.eclipse.equinox.p2.ui.sdk/scheduler

@Override
  public void widgetSelected(SelectionEvent e) {
    for (TreeItem item : viewer.getTree().getItems()) {
      if (!item.getChecked()) {
        item.setChecked(true);
        Event event = new Event();
        event.widget = item.getParent();
        event.detail = SWT.CHECK;
        event.item = item;
        event.type = SWT.Selection;
        viewer.getTree().notifyListeners(SWT.Selection, event);
      }
    }
    updatePageCompletion();
  }
});

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

Event expandEvent = new Event ();
expandEvent.item = item;
tree.notifyListeners(SWT.Expand, expandEvent);

相关文章

Tree类方法