}
dialog.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) {
Component component = dialog.getContentPane().getComponent(0);
BackContentUI content = (BackContentUI) contentManager.getContentByComponent(component);
content.fireSelected(false);
content.setDetached(false);
}
});
dialog.addWindowFocusListener(new WindowFocusListener() {
public void windowGainedFocus(WindowEvent e) {
if (!valueAdjusting && !contentValueAdjusting) {
BackContentUI newSelected = (BackContentUI) contentManager.getContentByComponent(
dialog.getContentPane().getComponent(0));
if (newSelected == lastSelected)
return;
if (lastSelected != null) {
try {
getFrameByComponent(lastSelected.getComponent()).setSelected(false);
// lastSelected.fireSelected(false);
} catch (Exception ignoreIt) {
}
}
lastSelected = newSelected;
newSelected.fireSelected(true);
}
}
public void windowLostFocus(WindowEvent e) {
}