本文整理匯總了Java中com.trollworks.toolkit.ui.widget.tree.TreePanel類的典型用法代碼示例。如果您正苦於以下問題:Java TreePanel類的具體用法?Java TreePanel怎麽用?Java TreePanel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TreePanel類屬於com.trollworks.toolkit.ui.widget.tree包,在下文中一共展示了TreePanel類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LibraryExplorerDockable
import com.trollworks.toolkit.ui.widget.tree.TreePanel; //導入依賴的package包/類
public LibraryExplorerDockable() {
super(new BorderLayout());
ListCollectionThread listCollectionThread = ListCollectionThread.get();
mNotifier = new Notifier();
TreeRoot root = new TreeRoot(mNotifier);
fillTree(listCollectionThread.getLists(), root);
mTreePanel = new TreePanel(root);
mTreePanel.setShowHeader(false);
mTreePanel.addColumn(new TextTreeColumn(TITLE, this, this));
mTreePanel.setAllowColumnDrag(false);
mTreePanel.setAllowColumnResize(false);
mTreePanel.setAllowColumnContextMenu(false);
mTreePanel.setAllowRowDropFromExternal(false);
mTreePanel.setAllowedRowDragTypes(0); // Turns off row dragging
mTreePanel.setShowRowDivider(false);
mTreePanel.setShowColumnDivider(false);
mTreePanel.setUseBanding(false);
mTreePanel.setUserSortable(false);
mTreePanel.setOpenableProxy(this);
mToolbar = new Toolbar();
mSearch = new Search(this);
mToolbar.add(mSearch, Toolbar.LAYOUT_FILL);
mToolbar.add(new IconButton(StdImage.TOGGLE_OPEN, TOGGLE_ROWS_OPEN_TOOLTIP, () -> mTreePanel.toggleDisclosure()));
add(mToolbar, BorderLayout.NORTH);
add(mTreePanel, BorderLayout.CENTER);
listCollectionThread.addListener(this);
}