71 */ 72 private TreeStateNode root; 73 74 /** 75 * Used in getting sizes for nodes to avoid creating a new Rectangle 76 * every time a size is needed. 77 */ 78 private Rectangle boundsBuffer; 79 80 /** 81 * Maps from <code>TreePath</code> to a <code>TreeStateNode</code>. 82 */ 83 private Hashtable<TreePath, TreeStateNode> treePathMapping; 84 85 /** 86 * A stack of stacks. 87 */ 88 private Stack<Stack<TreePath>> tempStacks; 89 90 91 public VariableHeightLayoutCache() { 92 super(); 93 tempStacks = new Stack<Stack<TreePath>>(); 94 visibleNodes = new Vector<Object>(); 95 boundsBuffer = new Rectangle(); 96 treePathMapping = new Hashtable<TreePath, TreeStateNode>(); 97 } 98 99 /** 100 * Sets the <code>TreeModel</code> that will provide the data. 101 * 102 * @param newModel the <code>TreeModel</code> that is to provide the data 103 * @beaninfo 104 * bound: true 105 * description: The TreeModel that will provide the data. 106 */ 107 public void setModel(TreeModel newModel) { 108 super.setModel(newModel); 109 rebuild(false); 110 } | 71 */ 72 private TreeStateNode root; 73 74 /** 75 * Used in getting sizes for nodes to avoid creating a new Rectangle 76 * every time a size is needed. 77 */ 78 private Rectangle boundsBuffer; 79 80 /** 81 * Maps from <code>TreePath</code> to a <code>TreeStateNode</code>. 82 */ 83 private Hashtable<TreePath, TreeStateNode> treePathMapping; 84 85 /** 86 * A stack of stacks. 87 */ 88 private Stack<Stack<TreePath>> tempStacks; 89 90 91 /** 92 * Constructs a {@code VariableHeightLayoutCache}. 93 */ 94 public VariableHeightLayoutCache() { 95 super(); 96 tempStacks = new Stack<Stack<TreePath>>(); 97 visibleNodes = new Vector<Object>(); 98 boundsBuffer = new Rectangle(); 99 treePathMapping = new Hashtable<TreePath, TreeStateNode>(); 100 } 101 102 /** 103 * Sets the <code>TreeModel</code> that will provide the data. 104 * 105 * @param newModel the <code>TreeModel</code> that is to provide the data 106 * @beaninfo 107 * bound: true 108 * description: The TreeModel that will provide the data. 109 */ 110 public void setModel(TreeModel newModel) { 111 super.setModel(newModel); 112 rebuild(false); 113 } |