Java Code Examples for javax.swing.plaf.basic.BasicTreeUI#setLeftChildIndent()

The following examples show how to use javax.swing.plaf.basic.BasicTreeUI#setLeftChildIndent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TreeUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
public static void invalidateCacheAndRepaint(@Nullable TreeUI ui) {
  if (ui instanceof BasicTreeUI) {
    BasicTreeUI basic = (BasicTreeUI)ui;
    basic.setLeftChildIndent(basic.getLeftChildIndent());
  }
}
 
Example 2
Source File: ChangesTreeList.java    From consulo with Apache License 2.0 4 votes vote down vote up
private void setChildIndent(boolean isFlat) {
  BasicTreeUI treeUI = (BasicTreeUI)getUI();

  treeUI.setLeftChildIndent(!isFlat ? UIUtil.getTreeLeftChildIndent() : 0);
  treeUI.setRightChildIndent(!isFlat ? UIUtil.getTreeRightChildIndent() : 0);
}