Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Custom cellrenderer with wrong getColumn
Custom cellrenderer with wrong getColumn [message #62908] Fri, 06 March 2009 15:06 Go to next message
David F. is currently offline David F.
Messages: 12
Registered: July 2009
Junior Member
Hello,

I try to customize the nebula grid to display a particular class called
MyClass.
So I have make my own CellRenderer and my own GridItem and I use them with
the nebula grid. My CellRenderer extends DefaultCellRenderer and use an
ArrayList of MyClass to store data (like the GridItem for texts or images).

But in my own paint(GC gc, Object value) method, when I ask to getColumn()
the number of the current column, I always have the number of columns
(like a count).
When I debug step by step, I can see that:
- getBounds is correct
- getRow is correct
- getColumn is wrong

Have you any idea of my error ?

Thanks

David
Re: Custom cellrenderer with wrong getColumn [message #62910 is a reply to message #62908] Fri, 06 March 2009 15:53 Go to previous message
David F. is currently offline David F.
Messages: 12
Registered: July 2009
Junior Member
Hi,

I found my error !
I don't understand that we have to use a different CellRenderer for each
column even if you store the same kind of information !
So by giving the same CellRenderer to each column, I always have the last
column number.
Re: Custom cellrenderer with wrong getColumn [message #593881 is a reply to message #62908] Fri, 06 March 2009 15:53 Go to previous message
David F. is currently offline David F.
Messages: 12
Registered: July 2009
Junior Member
Hi,

I found my error !
I don't understand that we have to use a different CellRenderer for each
column even if you store the same kind of information !
So by giving the same CellRenderer to each column, I always have the last
column number.
Previous Topic:Custom cellrenderer with wrong getColumn
Next Topic:CalendarCombo - Clear date programmatically
Goto Forum:
  


Current Time: Thu Oct 23 11:53:50 GMT 2014

Powered by FUDForum. Page generated in 0.13070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software