This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | org.netbeans.swing.outline.Outline ignores RenderDataProvider#getIcon() result in table columns | ||
---|---|---|---|
Product: | platform | Reporter: | hallorant <hallorant> |
Component: | Outline&TreeTable | Assignee: | Martin Entlicher <mentlicher> |
Status: | NEW --- | ||
Severity: | blocker | CC: | tboudreau |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Code Snippet
Icon used by the code snippet Screenshot showing icons missing in table cells Screenshot showing icons missing in table cells (with column headings) custom renderer for table cells |
Description
hallorant
2008-08-13 15:28:33 UTC
Created attachment 67272 [details]
Code Snippet
Created attachment 67273 [details]
Icon used by the code snippet
Created attachment 67274 [details]
Screenshot showing icons missing in table cells
Created attachment 67276 [details]
Screenshot showing icons missing in table cells (with column headings)
maybe i don't understand what this issue is about but i don't see any bug here. table cells (not in tree column) are not expandable so there's no need to provide icons for them. but if you do want icons there, just provide custom TableCellRenderer for those columns. i suppose javadoc for RenderDataProvider just be fixed to make it clear that icons are for tree column only. or am i missing something? The bug is bad API design. The RenderDataProvider should not provide data for the entire tree-table except icons in the table columns. Your statement "table cells (not in tree column) are not expandable so there's no need to provide icons for them." is just strange. If I don't want icons in those columns I simply program my RenderDataProvider to not dispense icons. I filed the bug (and spent time building the snippet) to help produce an API that felt like the control was an Outline -- not like a tree and a table taped together with duck tape and "band aids." Is this control an abstraction or a hack? I could not get your solution of using TableCellRenderer to work. Do you have an example? Or could you update the snippet to work properly? Thanks! Created attachment 68014 [details]
custom renderer for table cells
hallorant, does my custom renderer sample code work for you? Yes, I still believe the API is clunky...but many thanks for the example. I'm closing as worksforme as the issue is INCOMPLETE for more than 14 days. Please feel free to file new enhancements/bugs about the API design. Or reopen this one. i think the issue is still valid as an API enhancement |