本文整理汇总了Java中org.eclipse.swt.widgets.TreeItem.setExpanded方法的典型用法代码示例。如果您正苦于以下问题:Java TreeItem.setExpanded方法的具体用法?Java TreeItem.setExpanded怎么用?Java TreeItem.setExpanded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.TreeItem
的用法示例。
在下文中一共展示了TreeItem.setExpanded方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refreshDetails
import org.eclipse.swt.widgets.TreeItem; //导入方法依赖的package包/类
void refreshDetails() {
configDetails.removeAll();
List trackers = ((NewTorrentWizard) wizard).trackers;
Iterator iter = trackers.iterator();
while(iter.hasNext()) {
List trackerGroup = (List) iter.next();
TreeItem itemRoot = new TreeItem(configDetails,SWT.NULL);
Messages.setLanguageText(itemRoot, "wizard.multitracker.group");
Iterator iter2 = trackerGroup.iterator();
while(iter2.hasNext()) {
String url = (String) iter2.next();
new TreeItem(itemRoot,SWT.NULL).setText(url);
}
itemRoot.setExpanded(true);
}
}
示例2: refreshDetails
import org.eclipse.swt.widgets.TreeItem; //导入方法依赖的package包/类
void refreshDetails() {
configDetails.removeAll();
Map webseeds = wizard.webseeds;
Iterator iter = webseeds.entrySet().iterator();
while(iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();
TreeItem itemRoot = new TreeItem(configDetails,SWT.NULL);
itemRoot.setText((String)entry.getKey());
Iterator iter2 = ((List)entry.getValue()).iterator();
while(iter2.hasNext()) {
String url = (String) iter2.next();
new TreeItem(itemRoot,SWT.NULL).setText(url);
}
itemRoot.setExpanded(true);
}
}
示例3: expandAll
import org.eclipse.swt.widgets.TreeItem; //导入方法依赖的package包/类
public void expandAll(TreeItem treeItem) {
TreeItem[] treeItems = treeItem.getItems();
treeItem.setExpanded(true);
for (TreeItem sub : treeItems) {
expandAll(sub);
}
}
示例4: setDirectoryExpandedStates
import org.eclipse.swt.widgets.TreeItem; //导入方法依赖的package包/类
/**
* Change the "expanded" state of the node.
*/
protected void setDirectoryExpandedStates(TreeItem treeItem, boolean expand) {
treeItem.setExpanded(expand);
TreeItem[] treeItems = treeItem.getItems();
for (int i=0; i<treeItems.length; i++) {
setDirectoryExpandedStates(treeItems[i], expand);
}
}