row auto resizing [message #1386694] |
Thu, 19 June 2014 13:53 |
Gal Rogozinski Messages: 40 Registered: June 2014 |
Member |
|
|
Hello,
I've been trying to auto resize rows using the solution in the FAQ section of the doc:
natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
{
cellPainter = new LineBorderDecorator(new CustomTextPainter(
true, true, 5, false, true));
}
}
This worked but...
Scenario:
When I applied a filter on column the first row got larger (as it should).
When I removed the filter the first row remained with the large unneccessary height.
I tried the other solutions:
natTable.addPaintListener(new PaintListener()
{
@Override
public void paintControl(PaintEvent e){
for (int i = 0; i < natTable.getRowCount(); i++)
{
InitializeAutoResizeRowsCommand rowCommand = new InitializeAutoResizeRowsCommand(natTable, i, natTable.getConfigRegistry(), new GCFactory(
natTable));
AutoResizeRowsCommand command = new AutoResizeRowsCommand(rowCommand);
natTable.doCommand(command);
}
}
This did nothing!! Whether I changed the last flag of the cellPainter or not.
I noticed in debug that the appropriate command handler was called.
I tried invoking both InitializeAutoResizeRowsCommand and AutoResizeRowsCommand, yet nothing changed!
Any ideas??
Maybe I am missing a layer?
Thanks!
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03626 seconds