Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Problem with filter on 1.0.0
Problem with filter on 1.0.0 [message #1062157] Thu, 06 June 2013 06:03 Go to next message
Renso Lohuis is currently offline Renso Lohuis
Messages: 44
Registered: July 2012
Member
I am trying to use the new version for my project, but I found a problem with the filters. I try to reproduce it with the examples and I can. Sad

If you go to the Everything but the kitchen sink
Scroll all the way down
Then filter something with limited results like BB on rating

It now displays nothing in the grid. Scroll bar all the way to the right and bottom.
When you scroll up, then you can see everything again

When I do it in my application I get the following stacktrace:

java.lang.ArrayIndexOutOfBoundsException: -1
	at org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider.getColumnHeaderLabel(DefaultColumnHeaderDataProvider.java:34)
	at org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider.getDataValue(DefaultColumnHeaderDataProvider.java:56)
	at org.eclipse.nebula.widgets.nattable.layer.DataLayer.getDataValueByPosition(DataLayer.java:311)
	at org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer.getDataValueByPosition(DimensionallyDependentLayer.java:312)
	at org.eclipse.nebula.widgets.nattable.grid.layer.ColumnHeaderLayer.getDataValueByPosition(ColumnHeaderLayer.java:120)
	at org.eclipse.nebula.widgets.nattable.group.ColumnGroupHeaderLayer.getDataValueByPosition(ColumnGroupHeaderLayer.java:338)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.getDataValueByPosition(AbstractLayerTransform.java:331)
	at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.getDataValueByPosition(CompositeLayer.java:548)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.getDataValueByPosition(AbstractLayerTransform.java:331)
	at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.getDataValueByPosition(CompositeLayer.java:548)
	at org.eclipse.nebula.widgets.nattable.layer.cell.AbstractLayerCell.getDataValue(AbstractLayerCell.java:58)
	at org.eclipse.nebula.widgets.nattable.layer.cell.CellDisplayConversionUtils.convertDataType(CellDisplayConversionUtils.java:20)
	at org.eclipse.nebula.widgets.nattable.painter.cell.AbstractTextPainter.convertDataType(AbstractTextPainter.java:141)
	at org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter.paintCell(TextPainter.java:132)
	at org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper.paintCell(CellPainterWrapper.java:61)
	at org.eclipse.nebula.widgets.nattable.painter.cell.GradientBackgroundPainter.paintCell(GradientBackgroundPainter.java:100)
	at org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper.paintCell(CellPainterWrapper.java:61)
	at org.eclipse.nebula.widgets.nattable.painter.cell.decorator.BeveledBorderDecorator.paintCell(BeveledBorderDecorator.java:70)
	at org.eclipse.nebula.widgets.nattable.painter.cell.decorator.CellPainterDecorator.paintCell(CellPainterDecorator.java:188)
	at org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper.paintCell(CellPainterWrapper.java:61)
	at org.eclipse.nebula.widgets.nattable.painter.layer.CellLayerPainter.paintCell(CellLayerPainter.java:114)
	at org.eclipse.nebula.widgets.nattable.painter.layer.CellLayerPainter.paintLayer(CellLayerPainter.java:56)
	at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer$CompositeLayerPainter.paintLayer(CompositeLayer.java:862)
	at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer$CompositeLayerPainter.paintLayer(CompositeLayer.java:862)
	at org.eclipse.nebula.widgets.nattable.painter.layer.NatLayerPainter.paintLayer(NatLayerPainter.java:36)
	at org.eclipse.nebula.widgets.nattable.NatTable.paintNatTable(NatTable.java:341)
	at org.eclipse.nebula.widgets.nattable.NatTable.paintControl(NatTable.java:337)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:230)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1463)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4585)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Error while painting table: -1


Is this a known bug (I could not find one in bugzilla)?
Does anybody has a workaround for this?
Re: Problem with filter on 1.0.0 [message #1062210 is a reply to message #1062157] Thu, 06 June 2013 10:15 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1066
Registered: July 2012
Senior Member
It is a bug, not known until now. Please open a ticket.
Re: Problem with filter on 1.0.0 [message #1062220 is a reply to message #1062210] Thu, 06 June 2013 10:40 Go to previous message
Renso Lohuis is currently offline Renso Lohuis
Messages: 44
Registered: July 2012
Member
Thanks for the reply

I submitted the bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410080

Do you have any idea for a workaround?

What I try to do now, is to scroll up if a filter is changed.
I listen to RowStructuralRefreshEvent to see if a filter is changed.

I use the following code and it works most times. But not always. I try to figure out what the problem is.


			// If filter is changed then move scroll bar to top
			PixelCoordinate origin = viewportLayer.getOrigin();
			if (origin.getY() != 0) {
				int newX = origin.getX();
				if (newX > 5000) {
					newX = 0;
				}
				viewportLayer.resetOrigin(newX, 0);
			}

[Updated on: Thu, 06 June 2013 10:40]

Report message to a moderator

Previous Topic:EditModeEnum Dialog
Next Topic:Applying CSS to NatTable
Goto Forum:
  


Current Time: Sat Apr 19 02:54:29 EDT 2014

Powered by FUDForum. Page generated in 0.05823 seconds