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 08:38 Go to next message
karishma Agarwal is currently offline karishma Agarwal
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 08: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 08:39 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma Agarwal
Messages: 28
Registered: June 2011
Junior Member
No Message Body

[Updated on: Fri, 07 December 2012 08: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 03:12 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1067
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 03:47 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma Agarwal
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 03:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1067
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 03:55 Go to previous messageGo to next message
karishma Agarwal is currently offline karishma Agarwal
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 04:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1067
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 04:52 Go to previous message
karishma Agarwal is currently offline karishma Agarwal
Messages: 28
Registered: June 2011
Junior Member
Thanks Dirk. Some problem was there with my labels. Its working fine now.
Previous Topic:NatTable is not refreshed correctly
Next Topic:Disabling or enabling the cells in the table
Goto Forum:
  


Current Time: Thu Apr 24 01:34:21 EDT 2014

Powered by FUDForum. Page generated in 0.06375 seconds