Renderers

Top  Previous  Next

 

TreeTable uses separate renderers to paint the aggregate nodes of the tree. The aggregate renderer for a cell is taken with either specifying the row and column index for the cell, or the class of the cell's value:

 

public TableCellRenderer getAggregateCellRenderer(int row, int column);

public TableCellRenderer getDefaultAggregateRenderer(Class columnClass);

 

You can also assign an aggregate renderer, according to the class of the cell's value with:

 

public void setDefaultAggregateRenderer(Class columnClass, TableCellRenderer renderer);

 

By default, TreeTable will install DefaultTreeTableRenderer instances for all the basic classes (String, Object, Date, Boolean and Number).