I just looked through the TabPanes tutorial in trunk
/tutorials/src/org/apache/pivot/tutorials/navigation/TabPanes.java
/tutorials/src/org/apache/pivot/tutorials/navigation/tab_panes.bxml

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()?
If so, perhaps it would be worth adding some sort of TabPane.closeTab(int
tabIndex) method which would close the tab and then reselect another (if
there is one). This is the behaviour I would expect, and perhaps many others
too.


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())

At the least we need to document the significance of setting the selected
tab index to -1 or 0..n;

Chris

Reply via email to