/** * Sets the height of each cell. If rowHeight is less than or equal to 0 this will throw an * IllegalArgumentException. * * @param rowHeight the height of each cell, in pixels */ public void setRowHeight(int rowHeight) { if (rowHeight <= 0) throw new IllegalArgumentException( "FixedHeightLayoutCache only supports row heights greater than 0"); if (getRowHeight() != rowHeight) { super.setRowHeight(rowHeight); visibleNodesChanged(); } }
/** * Determines whether or not the root node from the TreeModel is visible. * * @param rootVisible true if the root node of the tree is to be displayed * @see #rootVisible */ public void setRootVisible(boolean rootVisible) { if (isRootVisible() != rootVisible) { super.setRootVisible(rootVisible); if (root != null) { if (rootVisible) { rowCount++; root.adjustRowBy(1); } else { rowCount--; root.adjustRowBy(-1); } visibleNodesChanged(); } } }
/** * Sets the TreeModel that will provide the data. * * @param newModel the TreeModel that is to provide the data */ public void setModel(TreeModel newModel) { super.setModel(newModel); rebuild(false); }
public void setNodeDimensions(final NodeDimensions nd) { super.setNodeDimensions(nd); if (getStateRoot() != null) { getStateRoot().invalidateSubtree(); } }
public void setRowHeight(final int rowHeight) { super.setRowHeight(rowHeight); if (getStateRoot() != null) { getStateRoot().invalidateSubtree(); } }