// TF:25/06/2009:Added special handling for a TabFolder. We just want to get all the components
// in the tab folder and recurse down into them. Luckily, TabFolders include a method that will
// give us all the components, irrespective of whether they are visible or not.
if (comp instanceof TabFolder) {
TabFolder pane = (TabFolder)comp;
for (Component c : pane.getAllPages()) {
processComponent(c, state);
}
}
// TF:26/05/2009:Changed this to process the JTabbed panes diffferent to the other components.
// A JTabbedPane can have 3 component prior to it's real components, depending on how it's
// been set up. (Eg SCROLL_TAB_LAYOUT has 3 components, WRAP_TAB_LAYOUT doesnt)
else if (comp instanceof JTabbedPane) {
JTabbedPane pane = (JTabbedPane)comp;
int tabs = pane.getTabCount();
// TF:26/05/2009:Unfortunately, as we're setting the visibility, this may change
// the component count and indexes, so remember the pages first.
List<Component> tabPages = new ArrayList<Component>(tabs);
for (int i = 0; i < tabs; i++) {
tabPages.add(pane.getComponentAt(i));
}
for (Component c : tabPages) {
processComponent(c, state);
}
}