QJCC homepage

biz.chitec.quarterback.swing
Interface TableRowHeightProvider

All Known Implementing Classes:
MultiLineTableRenderer

public interface TableRowHeightProvider

Interface for classes providing information about the required row height of a table This interface is needed by classes being responsible for table rendering in some way and which have the need for dynamically changed row heights. They can send such events - and hope that someone will listen to them.

Version:
$Id: cf030467f6fde4077a257405bc826959c87d849a $
Author:
cantamen/Dirk Hillbrecht 2005

Method Summary
 void addTableRowHeightListener(TableRowHeightListener l)
          Add a listener for row height change events.
 int getPreferredRowHeight(int column, int row)
          Return preferred row height of the table cell addressed by given column and row.
 void removeTableRowHeightListener(TableRowHeightListener l)
          Remove a listener for row height change events.
 

Method Detail

addTableRowHeightListener

public void addTableRowHeightListener(TableRowHeightListener l)
Add a listener for row height change events. The listener should be informed whenever the provider realizes that its row height should be changed.

Parameters:
l - A listener

removeTableRowHeightListener

public void removeTableRowHeightListener(TableRowHeightListener l)
Remove a listener for row height change events.

Parameters:
l - The listener in question.

getPreferredRowHeight

public int getPreferredRowHeight(int column,
                                 int row)
Return preferred row height of the table cell addressed by given column and row. The preferred height should be the height which is needed to render the cell correctly. The renderer behind the cell must not expect the row height to actually be that one. It can be given a smaller or bigger row height just as the contoller (whatever that one might be) decides. If the provider has now idea how high its column should be, it has to return -1.

Parameters:
column - Column of the cell in question
row - Row of the cell in question
Returns:
Preferred height of the row.

QJCC homepage