Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid - how do you provide image for row header?
Grid - how do you provide image for row header? [message #59660] Mon, 29 September 2008 21:54 Go to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
I am using Grid and GridTableViewer. I am able to see text but not the
image on RowHeader. What am I doing wrong?

grid.setHeaderVisible(true);
grid.setRowHeaderVisible(true);
gtv.setRowHeaderLabelProvider(new OppRowHeaderLabelProvider());

class OppRowHeaderLabelProvider extends CellLabelProvider
{

public void update(ViewerCell cell)
{


String text = "";
String id = "";


Brand br = (Brand)cell.getViewerRow().getElement();
text = br.getDesc();
cell.setText(text);
cell.setImage(ViewUtils.getImage(ViewUtils.WINDOW_16));
}
}


Thanks,

Dhiresh
Re: Grid - how do you provide image for row header? [message #59684 is a reply to message #59660] Mon, 29 September 2008 22:00 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I don't think the RowHeaderRenderer and the GridItem take this into
account though I haven't looked at the sources yet.

Tom

Dhiresh schrieb:
> I am using Grid and GridTableViewer. I am able to see text but not the
> image on RowHeader. What am I doing wrong?
>
> grid.setHeaderVisible(true);
> grid.setRowHeaderVisible(true);
> gtv.setRowHeaderLabelProvider(new OppRowHeaderLabelProvider());
>
> class OppRowHeaderLabelProvider extends CellLabelProvider {
>
> public void update(ViewerCell cell)
> {
> String text = "";
> String id = "";
>
>
> Brand br = (Brand)cell.getViewerRow().getElement();
> text = br.getDesc();
> cell.setText(text);
> cell.setImage(ViewUtils.getImage(ViewUtils.WINDOW_16));
> }
> }
>
>
> Thanks,
>
> Dhiresh
>
>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid - how do you provide image for row header? [message #59708 is a reply to message #59660] Mon, 29 September 2008 22:09 Go to previous messageGo to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
Hi Tom,
So, is there any other way to provide image for Row Header?

Thanks,

Dhiresh
Re: Grid - how do you provide image for row header? [message #59731 is a reply to message #59708] Mon, 29 September 2008 22:52 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Not until I filed [1] and committed the changes to CVS. You can only get
them from the header_footer branch in CVS and it looks like there's
still a problem if the size of the image is bigger than the default
height of a row, I'm just investigating this.

Tom

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=249056

Dhiresh schrieb:
> Hi Tom,
> So, is there any other way to provide image for Row Header?
>
> Thanks,
>
> Dhiresh


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid - how do you provide image for row header? [message #592421 is a reply to message #59660] Mon, 29 September 2008 22:00 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I don't think the RowHeaderRenderer and the GridItem take this into
account though I haven't looked at the sources yet.

Tom

Dhiresh schrieb:
> I am using Grid and GridTableViewer. I am able to see text but not the
> image on RowHeader. What am I doing wrong?
>
> grid.setHeaderVisible(true);
> grid.setRowHeaderVisible(true);
> gtv.setRowHeaderLabelProvider(new OppRowHeaderLabelProvider());
>
> class OppRowHeaderLabelProvider extends CellLabelProvider {
>
> public void update(ViewerCell cell)
> {
> String text = "";
> String id = "";
>
>
> Brand br = (Brand)cell.getViewerRow().getElement();
> text = br.getDesc();
> cell.setText(text);
> cell.setImage(ViewUtils.getImage(ViewUtils.WINDOW_16));
> }
> }
>
>
> Thanks,
>
> Dhiresh
>
>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid - how do you provide image for row header? [message #592431 is a reply to message #59660] Mon, 29 September 2008 22:09 Go to previous message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
Hi Tom,
So, is there any other way to provide image for Row Header?

Thanks,

Dhiresh
Re: Grid - how do you provide image for row header? [message #592441 is a reply to message #59708] Mon, 29 September 2008 22:52 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Not until I filed [1] and committed the changes to CVS. You can only get
them from the header_footer branch in CVS and it looks like there's
still a problem if the size of the image is bigger than the default
height of a row, I'm just investigating this.

Tom

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=249056

Dhiresh schrieb:
> Hi Tom,
> So, is there any other way to provide image for Row Header?
>
> Thanks,
>
> Dhiresh


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Grid - how do you provide image for row header?
Next Topic:GridViewer - Resources
Goto Forum:
  


Current Time: Sat Apr 20 07:33:40 GMT 2024

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

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

Back to the top