1322 |
while (node != null) |
while (node != null) |
1323 |
{ |
{ |
1324 |
count++; |
count++; |
1325 |
DefaultMutableTreeNode nextNode = node.getNextNode(); |
DefaultMutableTreeNode nextNode = getNextVisibleNode(node); |
1326 |
if (nextNode != null) |
if (nextNode != null) |
1327 |
maxWidth = Math.max(maxWidth, (int) (getCellBounds(0, 0, nextNode) |
maxWidth = Math.max(maxWidth, (int) (getCellBounds(0, 0, nextNode) |
1328 |
.getWidth())); |
.getWidth())); |
1896 |
|
|
1897 |
/** Number of mouse clicks on a non-leaf */ |
/** Number of mouse clicks on a non-leaf */ |
1898 |
private int clickCount = 0; |
private int clickCount = 0; |
1899 |
|
|
1900 |
|
/** The last non-leaf cell that was clicked */ |
1901 |
|
private Object lastClicked = null; |
1902 |
|
|
1903 |
/** |
/** |
1904 |
* Constructor |
* Constructor |
1946 |
&& BasicTreeUI.this.tree.isVisible(path)) |
&& BasicTreeUI.this.tree.isVisible(path)) |
1947 |
{ |
{ |
1948 |
if (!cntlClick && !BasicTreeUI.this.isLeaf(row)) |
if (!cntlClick && !BasicTreeUI.this.isLeaf(row)) |
1949 |
clickCount++; |
{ |
1950 |
|
Object cell = path.getLastPathComponent(); |
1951 |
|
if (lastClicked != null && lastClicked.equals(cell)) |
1952 |
|
clickCount = 2; |
1953 |
|
else |
1954 |
|
{ |
1955 |
|
lastClicked = cell; |
1956 |
|
clickCount = 1; |
1957 |
|
} |
1958 |
|
} |
1959 |
|
|
1960 |
if (clickCount == 2 || cntlClick == true) |
if (clickCount == 2 || cntlClick == true) |
1961 |
{ |
{ |
1962 |
clickCount = 0; |
clickCount = 0; |
1963 |
|
lastClicked = null; |
1964 |
BasicTreeUI.this.tree.getSelectionModel().clearSelection(); |
BasicTreeUI.this.tree.getSelectionModel().clearSelection(); |
1965 |
if (BasicTreeUI.this.tree.isExpanded(path)) |
if (BasicTreeUI.this.tree.isExpanded(path)) |
1966 |
{ |
{ |