HierarchicalTable singleExpansion row locking

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 singleExpansion row locking

Postby therodet » Thu Feb 02, 2006 11:13 am

As of right now, the options with the expansion of rows in a HierarchicalTable are either to have the user manually expand and collapse each row, or to have each row expansion collapse any other exapnded rows (via the setSingleExpansion function). I think it would be nice to have an intermediate option such that with singleExpansion set to true, a row can be "locked" open so that subsequent row expansions will not collapse the rows that have been locked in the expanded, but any expanded unlocked rows will be collapsed.
therodet
 
Posts: 37
Joined: Fri Dec 02, 2005 6:52 am
Location: Lansing, MI, US

Postby JIDE Support » Thu Feb 02, 2006 10:35 pm

I can understand what you asked but do you have a good use case?

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

Postby therodet » Fri Feb 03, 2006 6:15 am

What I am wanting to do is to create a table that functions in a manner similar to the HierarchicalTable demo you provide where clicking on a row atuomatically expands that row showing a few basic options, and collapses the others, but with the addition that I would leave the expansion handles visible, and if the user clicks the handle to expand the row, then the row would expand with a more detailed view, and stay there until closed. I would distinguish between the two expansion methods by setting a flag in the mouse click listener.
therodet
 
Posts: 37
Joined: Fri Dec 02, 2005 6:52 am
Location: Lansing, MI, US

Postby JIDE Support » Fri Feb 03, 2006 8:11 am

In this case I suggest you to disable build-in singleExpanion flag and wrhite your own logic to do it in ListSelectionListener. You just need to change the code in TradingHierarchicalTableDemo to get singleExpansion feature when single clicking on row.

Code: Select all
        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if (table.getSelectedRow() != -1) {
                    table.collapseAllRows();
                    table.expandRow(table.getSelectedRow());
                }
            }
        });


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


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 63 guests