Add an Icon to Grouped Row

Feel free to submit a message here to request a new forum. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

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

Add an Icon to Grouped Row

Postby jsavoretti » Mon Apr 17, 2017 3:46 am

I am Using this below piece of code.
Code: Select all
    _tableModel = new PluginAccessTableModel();
    FilterableTableModel filterableTableModel = new FilterableTableModel(_tableModel);
    _groupTableModel = new DefaultGroupTableModel(filterableTableModel);
   
    //grouping on the first column -Plugin
    //_groupTableModel.addGroupColumn(0, DefaultGroupTableModel.SORT_GROUP_COLUMN_ASCENDING);
    _groupTableModel.addGroupColumn(0);
   
    _groupTableModel.groupAndRefresh();


where PluginAccessTableModel() is an custom Table model. And i am setting the 1st column as Group column.
I am getting the the Grouped table properly, but i want to add an ICon to the Grouped row and add a listener to that ICon.

In the Attachment i have added screen shots of both desired output and actual output that i am having.
In Actual : I am getting Grouped Rows, but there is no Button added to the grouped column.
In Desired : Every thing else should be similar to Actual, and want to add an additional button to the Grouped Row.

Please Guide me how to do it.
Last edited by jsavoretti on Tue Apr 18, 2017 12:19 am, edited 1 time in total.
jsavoretti
 
Posts: 357
Joined: Thu Mar 08, 2007 9:31 am

Re: Add an Icon to Grouped Row

Postby JIDE Support » Mon Apr 17, 2017 9:41 am

You can define your own cell renderer to add an icon which is easy. However the question is I guess you want it to be clickable, right? If yes, it is not not easy to do. The icon is just a painted image, it is not an actual button. We tried to make it possible (check the HyperlinkCellDemo) but I am afraid it won't work with the group table.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Add an Icon to Grouped Row

Postby jsavoretti » Thu Apr 20, 2017 10:05 pm

Thanks for the suggestion, I was trying to see the some example implementation or java doc for HyperlinkCellDemo, but i am unable to find. Can you please help me here.
jsavoretti
 
Posts: 357
Joined: Thu Mar 08, 2007 9:31 am

Re: Add an Icon to Grouped Row

Postby JIDE Support » Thu Apr 20, 2017 10:50 pm

There is no document for that. All available help are in the HyperlinkCellDemo and the javadoc of TableCellEditorRenderer.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Requests for New Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron