When there is an invocation of the method setRowHeight that has the subsequent implementation:
- Code: Select all
public void setRowHeight(int rowHeight) {
if (rowHeight <= 0) {
throw new IllegalArgumentException("New row height less than 1");
}
setRowHeights(null);
super.setRowHeight(rowHeight);
resizeAndRepaint();
}
The call of the method setRowHeights(null); in the previous part of code cause a destruction of the old _rowHeights value and a re-inizialization with a new instance.
This cause a destruction of all custom listener attacched to the old instance.
It is possible to change the setRowHeights(null) with somethimg similiar to t.getRowHeights().insertRows(0, t.getRowCount() , rowHeight);
I can't do it ovverriding the method because I can't have a direct access to the setRowHeight(int) of the JTable class without pass throught the setRowHeight(int) of the JideTable class (the first instruction after setRowHeights(null); is "super.setRowHeight(rowHeight);")
Thanks