PDA

View Full Version : TreeTable rendering



tbuckel
26 Aug 2008, 4:59 PM
Hi,

I'm currently trying to change the rendering of nodes in a TreeTable. I'd like to display two lines per node. Digging through GXT's code, the actual rendering is done by TreeTableItemUI. My basic idea is to extend TreeTableItemUI with the intended rendering behaviour and here comes the problem:
TreeTableItemUI instances are created by TreeTableItem.getTreeItemUI() (which is even commented with 'Subclasses may override'. But to 'inject' an overriden TreeTableItem which creates a subclasses TreeTableItemUI, I'd have to override TreeTableBinder.createItem() which does much more than just creating a TreeTableItem, even invoking a couple of private method. This would require some code to be copied from GXT's TreeTableBinder into the a Binder subclass (definitely not nice).

Darrell, can you please advise how you have planned to integrate extensions like this? The comment on TreeTableItem.getTreeItemUI() seems like you thought of some strategy. Generally speaking, it would also be great if GXT was designed more towards extensibility - many classes have private fields without getters that would be important for subclasses...

All, is there an easier way to achieve this layout (which is predefined :()?

Thanks,
Thomas