package jalview.gui;
+import jalview.api.SplitContainerI;
+import jalview.api.ViewStyleI;
+import jalview.datamodel.AlignmentI;
+import jalview.jbgui.GAlignFrame;
+import jalview.jbgui.GSplitFrame;
+import jalview.structure.StructureSelectionManager;
+import jalview.viewmodel.AlignmentViewport;
+
import java.awt.Component;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
-import jalview.api.SplitContainerI;
-import jalview.api.ViewStyleI;
-import jalview.datamodel.AlignmentI;
-import jalview.jbgui.GAlignFrame;
-import jalview.jbgui.GSplitFrame;
-import jalview.structure.StructureSelectionManager;
-import jalview.viewmodel.AlignmentViewport;
-
/**
* An internal frame on the desktop that hosts a horizontally split view of
* linked DNA and Protein alignments. Additional views can be created in linked
@Override
public void internalFrameClosed(InternalFrameEvent evt)
{
- if (getTopFrame() instanceof AlignFrame)
- {
- ((AlignFrame) getTopFrame())
- .closeMenuItem_actionPerformed(true);
- }
- if (getBottomFrame() instanceof AlignFrame)
- {
- ((AlignFrame) getBottomFrame())
- .closeMenuItem_actionPerformed(true);
- }
+ close();
};
});
}