Here you can find the source of setLeftChildIndent(JTree tree, int indent)
Parameter | Description |
---|---|
tree | the tree to set the left indent for. |
indent | the new left indent in pixels. |
public static void setLeftChildIndent(JTree tree, int indent)
//package com.java2s; //License from project: Open Source License import javax.swing.JTree; import javax.swing.plaf.basic.BasicTreeUI; public class Main { /**//from w w w . j av a 2 s . c o m * Set's the left indent in pixels to use for the given {@link JTree}'s * collapsed and expanded icon. This value in conjuction with the right * indent comprises the total amount of space that the collapsed and * expanded icon draw into. If the given tree's UI delegate does not extend * from {@code BasicTreeUI} then the given tree will not be changed. * * @param tree the tree to set the left indent for. * @param indent the new left indent in pixels. * @see BasicTreeUI#setLeftChildIndent(int) */ public static void setLeftChildIndent(JTree tree, int indent) { ((BasicTreeUI) tree.getUI()).setLeftChildIndent(indent); } }