DesktopPanel desktopPanel = internalFrameToDesktopPanelMap.get(e.getInternalFrame());
if (!transferring && !desktopPanel.onClose(true)) {
return;
}
desktopPanel.removePropertyChangeListener(desktopPanelPropertyChangeListener);
modelItemToInternalFrameMap.remove(desktopPanel.getModelItem());
internalFrameToDesktopPanelMap.remove(e.getInternalFrame());
// replace content frame to make sure it is released