Issue Details (XML | Word | Printable)

Key: NTBL-202
Type: Functional Story Functional Story
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: baljeet.sandhu
Reporter: Edwin Park
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
NatTable

Auto resize column

Created: 13/Jan/09 07:49 PM   Updated: 12/Mar/09 06:00 PM   Resolved: 11/Mar/09 02:48 PM
Component/s: Column features
Affects Version/s: None
Fix Version/s: 2.0 iteration 6

Time Tracking:
Not Specified

Issue Links:
Require
 

Tag: auto resize
Test coverage: AutoResizeDelegateTest


 Description  « Hide

A column can be resized to the largest preferred width of all cells in the column (this would include the column header cells as well as all viewable body cells in the column).



Christian Martinez added a comment - 04/Mar/09 03:27 PM

When selecting all columns, the auto resize throws exception:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(ArrayList.java:324)
at net.sourceforge.nattable.reorder.ColumnReorderLayer.getColumnIndexByPosition(ColumnReorderLayer.java:30)
at net.sourceforge.nattable.layer.InvariantLayer.convertColumnPosition(InvariantLayer.java:26)
at net.sourceforge.nattable.layer.AbstractLayerTransform.getColumnWidthByPosition(AbstractLayerTransform.java:69)
at net.sourceforge.nattable.layer.AbstractLayerTransform.getColumnWidthByPosition(AbstractLayerTransform.java:70)
at net.sourceforge.nattable.layer.AbstractLayerTransform.getColumnWidthByPosition(AbstractLayerTransform.java:70)
at net.sourceforge.nattable.layer.AbstractLayerTransform.getColumnWidthByPosition(AbstractLayerTransform.java:70)
at net.sourceforge.nattable.grid.DimensionallyDependentLayer.getColumnWidthByPosition(DimensionallyDependentLayer.java:111)
at net.sourceforge.nattable.layer.InvariantLayer.getCellByPosition(InvariantLayer.java:76)
at net.sourceforge.nattable.layer.InvariantLayer.getCellsByPositionArea(InvariantLayer.java:49)
at net.sourceforge.nattable.resize.MaxCellBoundsHelper.getAllCellsInColumn(MaxCellBoundsHelper.java:46)
at net.sourceforge.nattable.resize.MaxCellBoundsHelper.getPreferedColumnWidths(MaxCellBoundsHelper.java:32)
at net.sourceforge.nattable.grid.GridLayer.handleAutoResizeColumnCommand(GridLayer.java:161)
at net.sourceforge.nattable.grid.GridLayer.doCommand(GridLayer.java:125)
at net.sourceforge.nattable.NatTable.doCommand(NatTable.java:771)
at net.sourceforge.nattable.test.acceptance.TestMenuItems$3.widgetSelected(TestMenuItems.java:63)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at net.sourceforge.nattable.test.fixture.acceptance.MinimalTableFixture.openTable(MinimalTableFixture.java:73)
at net.sourceforge.nattable.test.fixture.acceptance.StyledMinimalTable.main(StyledMinimalTable.java:111)