?? e1030. preventing the expansion or collapse of a node in a jtree component.txt
字號:
The tree component's row height property controls the height of every displayed node. If the row height is greater than 0, all rows will be given the specified height. However, if the rows can be of differing heights, it is necessary to set the row height to 0. With a 0 row height, all heights of all rows are computed individually.
// Create tree
JTree tree = new JTree();
// All rows will be given 15 pixels of height
tree.setRowHeight(15);
// Have the row height for each row computed individually
tree.setRowHeight(0);
// If the row height is 0 and the height of a row has dynamically changed, it is necessary
// to flush the internal cache of row heights. The following calls flush the internal cache.
if (tree.getRowHeight() <= 0) {
// Temporary change to non-zero height
tree.setRowHeight(1);
}
tree.setRowHeight(0);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -