我正在使用JFace treeviewer,想知道如何禁用折叠项目的能力以及如何删除可折叠图标。
Restricting all key events on Tree looks promising but you would loose navigating the tree structure and expand/collapse on tree node and all other functionality.
tree.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { e.doit = false; } });
Or also if you use JTree
,
JTree jtree = new JTree();
jtree.setToggleClickCount(0);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.