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

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

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

Tree.removeAll介绍

[英]Removes all of the items from the receiver.
[中]从接收器中删除所有项目。

代码示例

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

public void clear() {
 if ( tree != null ) {
  tree.removeAll();
 }
 treeNodeItemMap.clear();
 hideAll();
}

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

private boolean getData() {
 // Clear the tree top entry
 if ( tiTree != null && !tiTree.isDisposed() ) {
  tiTree.dispose();
 }
 wTree.removeAll();
 try {
  buildFoldersTree( this.folder, null, true );
 } catch ( Exception e ) {
  return false;
 }
 return true;
}

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

public void activate() {
 try {
  getVfsFileChooserDialog().setRootFile( null );
  getVfsFileChooserDialog().setInitialFile( null );
  getVfsFileChooserDialog().openFileCombo.setText( GoogleDriveFileProvider.SCHEME + "://" );
  getVfsFileChooserDialog().vfsBrowser.fileSystemTree.removeAll();
  super.activate();
  FileObject newRoot = resolveFile( getVfsFileChooserDialog().openFileCombo.getText() );
  getVfsFileChooserDialog().vfsBrowser.resetVfsRoot( newRoot );
 } catch ( FileSystemException e ) {
  System.out.println( e );
 }
}

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

wTree.removeAll();

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

/**
 * Refresh the data in the tree-table... Use the data from the JobTracker in the job
 */
private void refreshTreeTable() {
 if ( jobTracker != null ) {
  int nrItems = jobTracker.getTotalNumberOfItems();
  if ( nrItems != previousNrItems ) {
   // Allow some flickering for now ;-)
   wTree.removeAll();
   // Re-populate this...
   TreeItem treeItem = new TreeItem( wTree, SWT.NONE );
   String jobName = jobTracker.getJobName();
   if ( Utils.isEmpty( jobName ) ) {
    if ( !Utils.isEmpty( jobTracker.getJobFilename() ) ) {
     jobName = jobTracker.getJobFilename();
    } else {
     jobName = BaseMessages.getString( PKG, "JobLog.Tree.StringToDisplayWhenJobHasNoName" );
    }
   }
   treeItem.setText( 0, jobName );
   TreeMemory.getInstance().storeExpanded( STRING_CHEF_LOG_TREE_NAME, new String[] { jobName }, true );
   for ( int i = 0; i < jobTracker.nrJobTrackers(); i++ ) {
    addTrackerToTree( jobTracker.getJobTracker( i ), treeItem );
   }
   previousNrItems = nrItems;
   TreeMemory.setExpandedFromMemory( wTree, STRING_CHEF_LOG_TREE_NAME );
  }
 }
}

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

public void refreshTree() throws MetaStoreException {
 tree.removeAll();

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

private void refreshTree() {
 try {
  wTree.removeAll();
  TreeItem ti = null;
  // If the directory is a root directory and is visible to the user we will
  // display that on the UI otherwise we will hide it
  if ( directoryTree.isRoot() && directoryTree.isVisible() ) {
   ti = new TreeItem( wTree, SWT.NONE );
   ti.setImage( GUIResource.getInstance().getImageFolder() );
   ti.setExpanded( true );
   RepositoryDirectoryUI.getTreeWithNames(
     ti, rep, dircolor, sortColumn, includeDeleted, ascending, showTrans, showJobs, directoryTree,
     filterString, pattern );
  } else {
   for ( int i = 0; i < directoryTree.getNrSubdirectories(); i++ ) {
    RepositoryDirectory subdir = directoryTree.getSubdirectory( i );
    ti = new TreeItem( wTree, SWT.NONE );
    ti.setImage( GUIResource.getInstance().getImageFolder() );
    RepositoryDirectoryUI.getTreeWithNames(
      ti, rep, dircolor, sortColumn, includeDeleted, ascending, showTrans, showJobs, subdir, filterString,
      pattern );
   }
  }
 } catch ( KettleException e ) {
  new ErrorDialog(
    shell, BaseMessages.getString( PKG, "SelectObjectDialog.Dialog.UnexpectedError.Title" ), BaseMessages
    .getString( PKG, "SelectObjectDialog.Dialog.UnexpectedError.Message" ), e );
 }
}

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

@Override
protected void removeAll(Control widget) {
  ((Tree) widget).removeAll();
}

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

wTree.removeAll();
objectMap.clear();

代码示例来源:origin: cbeust/testng-eclipse

private void reset() {
 m_suites.clear();
 m_tests.clear();
 m_classes.clear();
 m_methods.clear();
 m_tree.removeAll();
}

代码示例来源:origin: BiglySoftware/BiglyBT

private void refresh() {
 treeGroups.removeAll();
 Iterator iter = webseeds.entrySet().iterator();
 while(iter.hasNext()) {
  Map.Entry entry = (Map.Entry) iter.next();
  TreeItem itemRoot = newGroup((String)entry.getKey());
  Iterator iter2 = ((List)entry.getValue()).iterator();
  while(iter2.hasNext()) {
   String url =  (String) iter2.next();
   newTracker(itemRoot,url);
  }
 }
}

代码示例来源:origin: BiglySoftware/BiglyBT

private void refresh() {
 treeGroups.removeAll();
 Iterator iter = trackers.iterator();
 while(iter.hasNext()) {
  List trackerGroup = (List) iter.next();
  TreeItem itemRoot = newGroup();
  Iterator iter2 = trackerGroup.iterator();
  while(iter2.hasNext()) {
   String url =  (String) iter2.next();
   newTracker(itemRoot,url);
  }
 }
}

代码示例来源:origin: cbeust/testng-eclipse

@Override
public void aboutToStart() {
 reset();
 m_runInfos.clear();
 m_tree.removeAll();
 m_treeItemMap = new Hashtable<String, ITreeItem>();
 m_failureTraceComponent.clear();
}

代码示例来源:origin: org.codehaus.openxma/xmartclient

/**
 * This method first removes all items from the SWT tree. It then
 * rebuilds the complete SWT tree.
 */
private void nodes2UI () {
  tree_.removeAll();
  nodeItemMap_ = new HashMap();
  TreeNode [] roots = wModel_.getRoots();
  for (int i=0; i<roots.length; i++) {
    addSubtree (roots[i], null);
  }
}

代码示例来源:origin: org.xworker/xworker_swt

public void run(){
    try{
      //先清空数据
      tree.removeAll();
      
      TreeItem item = new TreeItem(tree, SWT.NONE);
      item.setText("loading...");
    }catch(Throwable t){
      log.error("TableDataStoreListener beforeLoad error", t);
    }
  }
});

代码示例来源:origin: org.xworker/xworker_swt

/**
 * 在树上重新刷新和显示菜单。
 */
public void refresh(){
  //先清空树
  tree.removeAll();
  
  for(Thing item : thing.getChilds("Item")){
    SwtUtils.showThingOnTree(item, tree, actionContext);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui

public void setMethods( BooleanSelection[] methods )
{
 methodsTree_.removeAll();
 
 for( int index = 0; index < methods.length; index++ )
 {
  if(methods[index] == null)continue;
  TreeItem item = new TreeItem( methodsTree_, SWT.NULL );
  item.setText( methods[index].getValue() );
  item.setChecked( methods[index].isSelected() );
 }
}

代码示例来源:origin: pentaho/big-data-plugin

public void activate() {
 vfsFileChooserDialog.setRootFile( null );
 vfsFileChooserDialog.setInitialFile( null );
 vfsFileChooserDialog.openFileCombo.setText( "maprfs://" );
 vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll();
 super.activate();
 try {
  FileObject newRoot = resolveFile( vfsFileChooserDialog.openFileCombo.getText() );
  vfsFileChooserDialog.vfsBrowser.resetVfsRoot( newRoot );
 } catch ( FileSystemException ignored ) {
  //ignored
 }
}

代码示例来源:origin: pentaho/big-data-plugin

public void activate() {
 vfsFileChooserDialog.setRootFile( null );
 vfsFileChooserDialog.setInitialFile( null );
 vfsFileChooserDialog.openFileCombo.setText( "hdfs://" );
 vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll();
 getNamedClusterWidget().initiate();
 getNamedClusterWidget().setSelectedNamedCluster( namedCluster );
 super.activate();
}

代码示例来源:origin: pentaho/big-data-plugin

@Override
public void activate() {
 vfsFileChooserDialog.setRootFile( null );
 vfsFileChooserDialog.setInitialFile( null );
 vfsFileChooserDialog.openFileCombo.setText(  Schemes.NAMED_CLUSTER_SCHEME + "://" );
 vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll();
 getNamedClusterWidget().initiate();
 getNamedClusterWidget().setSelectedNamedCluster( namedCluster );
 super.activate();
}

相关文章

Tree类方法