@Override public void setUI(TreeUI ui) { super.setUI(ui); if (ui instanceof BasicTreeUI) { BasicTreeUI bui = (BasicTreeUI)ui; treeHandleWidth = bui.getLeftChildIndent() + bui.getRightChildIndent(); } else { treeHandleWidth = -1; } }
private void setTreeUIVariables() { if (tree.getUI() instanceof BasicTreeUI) { BasicTreeUI treeUI = (BasicTreeUI) tree.getUI(); treeSignExtent = treeUI.getExpandedIcon().getIconWidth() / 2; treeSignRightMargin = treeUI.getRightChildIndent(); } }
/** * If a negative number is returned, then all events that occur in the * leading margin will be forwarded to the tree and consumed. * * @return the width of the tree handle if it can be determined, else -1 */ protected int getTreeHandleWidth() { if (renderer.getUI() instanceof BasicTreeUI) { BasicTreeUI ui = (BasicTreeUI) renderer.getUI(); return ui.getLeftChildIndent() + ui.getRightChildIndent(); } else { return -1; } }
/** * If a negative number is returned, then all events that occur in the * leading margin will be forwarded to the tree and consumed. * * @return the width of the tree handle if it can be determined, else -1 */ protected int getTreeHandleWidth() { if (renderer.getUI() instanceof BasicTreeUI) { BasicTreeUI ui = (BasicTreeUI) renderer.getUI(); return ui.getLeftChildIndent() + ui.getRightChildIndent(); } else { return -1; } }
/** * If a negative number is returned, then all events that occur in the * leading margin will be forwarded to the tree and consumed. * * @return the width of the tree handle if it can be determined, else -1 */ protected int getTreeHandleWidth() { if (renderer.getUI() instanceof BasicTreeUI) { BasicTreeUI ui = (BasicTreeUI) renderer.getUI(); return ui.getLeftChildIndent() + ui.getRightChildIndent(); } else { return -1; } }
/** * If a negative number is returned, then all events that occur in the * leading margin will be forwarded to the tree and consumed. * * @return the width of the tree handle if it can be determined, else -1 */ protected int getTreeHandleWidth() { if (renderer.getUI() instanceof BasicTreeUI) { BasicTreeUI ui = (BasicTreeUI) renderer.getUI(); return ui.getLeftChildIndent() + ui.getRightChildIndent(); } else { return -1; } }
/** Make a path visible. * @param path the path */ private void showPathWithoutExpansion(TreePath path) { Rectangle rect = tree.getPathBounds(path); if (rect != null) { //PENDING TreeUI tmp = tree.getUI(); int correction = 0; if (tmp instanceof BasicTreeUI) { correction = ((BasicTreeUI) tmp).getLeftChildIndent(); correction += ((BasicTreeUI) tmp).getRightChildIndent(); } rect.x = Math.max(0, rect.x - correction); if (rect.y >= 0) { //#197514 - do not scroll to negative y values tree.scrollRectToVisible(rect); } } }
int middleXOfKnob; if (isLeftToRight(t)) { middleXOfKnob = bounds.x - getRightChildIndent() + 1; } else { middleXOfKnob = bounds.x + bounds.width + getRightChildIndent() - 1;