borland Packages  Class Hierarchy  dbswing Package 

TableHeaderRenderer class

java.lang.Object
   +----com.borland.dbswing.TableHeaderRenderer

About the TableHeaderRenderer class

Properties  Methods  

Implements Serializable, TableCellRenderer

Note: This is a feature of JBuilder Professional and Enterprise.

TableHeaderRenderer can be used in place of a TableColumn's default header renderer to display multi-line column headers. Note that because this renderer maintains state information, a single instance cannot be reused as the renderer for multiple TableColumn objects. This renderer also assumes that once its value has ben set, it is unlikely to change and tries to take advantage of this assumption to achieve better performance.

Because TableColumn.setHeaderValue() takes an Object as its parameter, you have the option of passing a String containing newline characters ('\n') to it, or an array of String objects. Because passing an array is more efficient, consider this option if possible. TableHeaderRenderer is used internally by JdbTable whenever there is a header which consists of either an array of Strings or a String containing newline characters.

Example:

// specify JdbHeader as the first column's renderer
jTable.getColumnModel().getColumn(0).setHeaderRenderer(new TableHeaderRenderer());

// specify a multi-line column header
jTable.getColumnModel().getColumn(1).setHeaderValue(new String[]{"Line1", "Line2"});

TableHeaderRenderer properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

TableHeaderRenderer methods

Methods implemented in this class

Methods implemented in java.lang.Object