本文整理匯總了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);
}
}