pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: TabPane closing & collapsing
Date Thu, 26 Aug 2010 17:05:33 GMT
Thanks for the quick response.
OK, I will add a a JIRA ticket and then try to put in the changes tomorrow.

Chris

On 27 August 2010 00:01, Greg Brown <gkbrown@mac.com> wrote:

> Good points. Comments below:
>
> > The logic to select a tab after another one is closed, exists as a custom
> > TabPaneListener in TabPanes.java rather than in the TabPane component
> > itself.
> >
> > Is it done this way because 'closing' a tab just results in a call to
> > TabSequence.remove()?
>
> Yes - but maybe we should be smarter about it. We automatically select the
> first tab that is added to a TabPane; perhaps we should automatically select
> the next (or previous, if none is available) tab when a tab is closed. Same
> logic could apply to Accordion. Then users wouldn't need the custom
> listener.
>
> > On a vaguely similar theme, should there be user friendly methods for
> > handling the collapsed state of the TabPane?
> > - tabPane.setCollapsed(boolean collapsed)
> > - tabPane.isCollapsed()
> >
> > rather than
> > - tabPane.setSelectedIndex(-1 / 0..n)
> > - ((tabPane.getSelectedIndex() == -1) && isCollapsible())
>
> I think this is a good idea. "collapsible" used to be a style property, so
> such a method wouldn't have made sense. I think it would now, though.
>
> Feel free to exercise your new commit privileges on these changes.  :-)
>
> G
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message