Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows
not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989741] Fri, 07 December 2012 13:38 Go to next message
karishma Agarwal is currently offline karishma AgarwalFriend
Messages: 28
Registered: June 2011
Junior Member
Hello,

Actually I have created a Nattable which is based on Tree structure and has cells which are spanning rows. I want to attach a combined painter(Text Painter and TreeCheckBoxPainter) to that spanning cell. I am not able to achieve this.I am doing this for combining the painters.

configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER,
new BackgroundPainter(
new CellPainterDecorator(
new TextPainter() {
@Override
protected String convertDataType(ILayerCell cell, IConfigRegistry configRegistry) {
//Datum dataValue = (Datum) cell.getDataValue();
return "Blackberry 5.0 and above";
}
},
CellEdgeEnum.BOTTOM,
serverSideBB5CheckBoxPainter
)
),
DisplayMode.NORMAL,
BuildTreeLayer.BB_5_SPA_LABEL
);
and I have created a DataProvider which implements ISpanningDataProvider and extends GlazedListDataProvider and I have overridden the getCellByPosition() method.Only the CheckBox is getting painted. The Text is not getting painted. Am I missing something else to achieve this??


Thanks,
Karishma Agarwal

[Updated on: Fri, 07 December 2012 13:40]

Report message to a moderator

Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989743 is a reply to message #989741] Fri, 07 December 2012 13:39 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma AgarwalFriend
Messages: 28
Registered: June 2011
Junior Member
No Message Body

[Updated on: Fri, 07 December 2012 13:40]

Report message to a moderator

Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989947 is a reply to message #989743] Mon, 10 December 2012 08:12 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

never tried spanning in a tree before. Is spanning working with a simple TextPainter there?

Greez,
Dirk
Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989951 is a reply to message #989947] Mon, 10 December 2012 08:47 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma AgarwalFriend
Messages: 28
Registered: June 2011
Junior Member
Hi,

Thanks for ur fast reply. Actually spanning is working with a simple checkBox painter. I havent tried with a simple TextPainter. And also since the text which I am passing is bit large to fit in one line in a row.so It is expanding the height of the row. That means internally it is trying to paint the text but something is missing due to which the text is not visible.

Thanks,
Karishma
Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989952 is a reply to message #989951] Mon, 10 December 2012 08:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

if a simple CheckboxPainter is working with spanning in a tree, and the TreeCheckboxPainter doesn't, I'll assume it is a bug. Could you please file a bug in bugzilla so it can be tracked and investigated correctly?

Thanks,
Dirk
Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989954 is a reply to message #989952] Mon, 10 December 2012 08:55 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma AgarwalFriend
Messages: 28
Registered: June 2011
Junior Member
Sorry, actually by CheckBoxPainter, i meant TreeCheckBoxPainter only. TreeCheckBoxPainter alone is working fine.But when combining with TextBox, its not showing the desired results.
Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989956 is a reply to message #989954] Mon, 10 December 2012 09:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Oh, sorry, so I missunderstood your issue. Are you sure that the label you attached that painter to is set correctly?
Re: not able to combine Text Painter and TreeCheckBoxPainter in a cell which spans multiple rows [message #989964 is a reply to message #989956] Mon, 10 December 2012 09:52 Go to previous message
karishma Agarwal is currently offline karishma AgarwalFriend
Messages: 28
Registered: June 2011
Junior Member
Thanks Dirk. Some problem was there with my labels. Its working fine now.
Previous Topic:How to change the font?
Next Topic:Change the cursor style for a table cell?
Goto Forum:
  


Current Time: Fri Mar 29 14:39:05 GMT 2024

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

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

Back to the top