HierarchicalTable child component painter

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

HierarchicalTable child component painter

Postby therodet » Thu Jun 08, 2006 12:44 pm

Hopefully I can explain this in a way that makes sense, and if this is already implemented and I simply haven't found it, all the better ...
One of the 'hitches' that I am running up against with HierarchicalTable is that I have some cases where I have a long list of items in a table, and I want to have them all expanded; for example, to show a block of text providing extended information regarding the table row. Since HierarchicalTable must have a distinct component for each expanded row, this can start to consume a lot of memory and slow things down.
What I would like to see is a variation that treats the child components in much the same way the table treats a cell; the child component is actually a renderer that is passed some row specific parameter to update its display for a specific row, and the same actual component can be reused for every row. This could then be extended further to allow for an 'editor' component (again, as the table does) when a particular expanded child is selected.
I don't know that this would work so well for the Hierarchical nature of HierarchicalTable, for displaying a little extra information with each row, it seems like it could be much more efficient.
therodet
 
Posts: 37
Joined: Fri Dec 02, 2005 6:52 am
Location: Lansing, MI, US

Postby JIDE Support » Thu Jun 08, 2006 2:25 pm

This is probably not something we would want to do in HierarchicalTable. HierarchicalTable should use real component (not just a painted image) for child component because most likely users want to interactive with the child component. If they were for display purpose only, your proposal would make sense. However since you have the control over the child component, you could do it yourself. I.e. create a JPanel and paint your component (the same instance) over it and return the JPanel - the same technique as CellRendererPane.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby therodet » Fri Jun 09, 2006 4:18 am

I believe I understand what you're suggesting, but I'm wondering how the painter would be able to know which row it was painting for - unless you're suggesting that I create a unique JPanel for each row to which I would then apply the same painter, but this would only partially alleviate the problem; I would still have hundreds or thousands of JPanels consuming resources.
therodet
 
Posts: 37
Joined: Fri Dec 02, 2005 6:52 am
Location: Lansing, MI, US

Postby JIDE Support » Fri Jun 09, 2006 8:34 am

I was suggesting each JPanel for each row so it will end up with many JPanels. However this is still better than many real child components which could have more complex components in it.

I certainly think it is possible to do the renderer approach. However I am just not sure if this is the right way to do. Would you mind emailing me (support@jidesoft.com) a screenshot of what your table looks like. In my experence, most users use HierarchicalTable to create a child component that needs to be able to click on and do something.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Screenshot has been sent

Postby therodet » Fri Oct 27, 2006 10:22 am

I have sent a screen shot and a more revised explanation to your support@jidesoft.com address
therodet
 
Posts: 37
Joined: Fri Dec 02, 2005 6:52 am
Location: Lansing, MI, US


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 81 guests