}
}
protected Container getComponentWrapper(Dockable dockable, Component component) {
final JTabbedContentPane tabbedContentPane = (JTabbedContentPane) super.getComponentWrapper(dockable, component);
tabbedContentPane.setTabPlacement(tabPlacement.ordinal() + 1);
tabbedContentPane.setTabLayoutPolicy(tabLayout.ordinal());
tabbedContentPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
if (!valueAdjusting && !contentValueAdjusting) {
PlafContent newSelected = (PlafContent) tabbedContentPane.getSelectedContent();
if (newSelected != null) {
if (newSelected == lastSelected)
return;
if (lastSelected != null) {
try {
lastSelected.fireSelected(false);
} catch (Exception ignoreIt) {
}
}
lastSelected = newSelected;
newSelected.fireSelected(true);
}
}
}
});
tabbedContentPane.addTabbedContentPaneListener(new TabbedContentPaneListener() {
public void tabbedContentPaneEventFired(TabbedContentPaneEvent event) {
Content content = event.getContent();
switch (event.getActionId()) {
case ON_CLOSE:
if (fireContentUIRemoving(getContentUI(content)))