protected void initComponents() {
detachedContentUIMap = new Hashtable<Content, TabbedContentUI>();
final JTabbedContentManager tabbedContentManager = new JTabbedContentManager();
tabbedContentManager.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
if (!valueAdjusting && !contentValueAdjusting) {
Component selectedComponent = tabbedContentManager.getSelectedComponent();
if (selectedComponent == null)
return;
PlafContentUI newSelected = (PlafContentUI) contentManager.getContentByComponent(selectedComponent);
if (newSelected == lastSelected)
return;
if (lastSelected != null) {
try {
lastSelected.fireSelected(false);
} catch (Exception ignoreIt) {
}
}
lastSelected = newSelected;
newSelected.fireSelected(true);
}
}
});
tabbedContentManager.addTabListener(new TabListener() {
public void tabEventFired(TabEvent event) {
Content content = event.getContent();
switch (event.getActionId()) {
case ON_CLOSE:
try {