JIDE 3.5.15

com.jidesoft.grid
Class HierarchicalRowHeights

java.lang.Object
  extended by com.jidesoft.grid.RowHeights
      extended by com.jidesoft.grid.HierarchicalRowHeights

public class HierarchicalRowHeights
extends RowHeights

A special row model for HierarchicalTable. In addition to the row height information that RowHeights keeps track of, it also maintains another SizeSequence of the actual row heights without child components.


Field Summary
 
Fields inherited from class com.jidesoft.grid.RowHeights
_rowCount, _sizeSequence, listenerList
 
Constructor Summary
HierarchicalRowHeights()
           
HierarchicalRowHeights(int numEntries)
           
HierarchicalRowHeights(int[] heights)
           
HierarchicalRowHeights(int numEntries, int value)
           
 
Method Summary
 int getActualRowHeight(int index)
          Returns the actual row height of the specified row.
 int[] getActualRowHeights()
          Returns the actual row height of all rows.
 void insertRows(int start, int length, int value)
          Adds a contiguous group of row heights to this RowHeights.
 void removeRows(int start, int length)
          Removes a contiguous group of entries from this RowHeights.
 void setActualRowHeight(int index, int height)
          Sets the actual height of the specified row.
 void setActualRowHeights(int[] rowHeights)
          Resets this HierarchicalRowHeights object, using the data in the rowHeights argument.
 
Methods inherited from class com.jidesoft.grid.RowHeights
addRowHeightChangeListener, fireRowHeightChanged, getRowHeight, getRowHeightChangeListeners, getRowHeights, getRowIndex, getRowPosition, removeRowHeightChangeListener, setRowHeight, setRowHeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalRowHeights

public HierarchicalRowHeights()

HierarchicalRowHeights

public HierarchicalRowHeights(int[] heights)

HierarchicalRowHeights

public HierarchicalRowHeights(int numEntries,
                              int value)

HierarchicalRowHeights

public HierarchicalRowHeights(int numEntries)
Method Detail

setActualRowHeights

public void setActualRowHeights(int[] rowHeights)
Resets this HierarchicalRowHeights object, using the data in the rowHeights argument. This method reinitializes this object so that it contains as many rows as the rowHeights array. Each row height is initialized to the value of the corresponding item in rowHeights.

Parameters:
rowHeights - the array of rowHeights to be contained in this RowHeights

setActualRowHeight

public void setActualRowHeight(int index,
                               int height)
Sets the actual height of the specified row. The actual row height is usually less than the row height as row height considers the height of child component when expanded. Note that if the value of index does not fall in the range: (0 <= index < getActualRowHeights().length) the behavior is unspecified.

Parameters:
index - the index corresponding to the row
height - the actual height of the row

getActualRowHeights

public int[] getActualRowHeights()
Returns the actual row height of all rows.

Returns:
a new array containing the actual row heights in this object

getActualRowHeight

public int getActualRowHeight(int index)
Returns the actual row height of the specified row. If index is out of the range (0 <= index < getActualRowHeights().length) the behavior is unspecified.

Parameters:
index - the index corresponding to the row
Returns:
the height of the row

insertRows

public void insertRows(int start,
                       int length,
                       int value)
Description copied from class: RowHeights
Adds a contiguous group of row heights to this RowHeights. Note that the values of start and length must satisfy the following conditions: (0 <= start < getRowHeights().length) AND (length >= 0). If these conditions are not met, the behavior is unspecified and an exception may be thrown.

Overrides:
insertRows in class RowHeights
Parameters:
start - the index to be assigned to the first row in the group
length - the number of rows in the group
value - the size to be assigned to each new row

removeRows

public void removeRows(int start,
                       int length)
Description copied from class: RowHeights
Removes a contiguous group of entries from this RowHeights. Note that the values of start and length must satisfy the following conditions: (0 <= start < getRowHeights().length) AND (length >= 0). If these conditions are not met, the behavior is unspecified and an exception may be thrown.

Overrides:
removeRows in class RowHeights
Parameters:
start - the index of the first row to be removed
length - the number of rows to be removed

JIDE 3.5.15