{
System.exit(0);
}
- else
+
+ viewport = null;
+ if (alignPanel != null && alignPanel.overviewPanel != null)
{
+ alignPanel.overviewPanel.dispose();
}
- viewport = null;
alignPanel = null;
this.dispose();
}
{
EditCommand editCommand = (EditCommand) command;
al = editCommand.getAlignment();
- Vector comps = (Vector) PaintRefresher.components
+ Vector comps = PaintRefresher.components
.get(viewport.getSequenceSetId());
for (int i = 0; i < comps.size(); i++)
{
PaintRefresher.Register(newaf.alignPanel.seqPanel.seqCanvas,
newaf.alignPanel.av.getSequenceSetId());
- Vector comps = (Vector) PaintRefresher.components
+ Vector comps = PaintRefresher.components
.get(viewport.getSequenceSetId());
int viewSize = -1;
for (int i = 0; i < comps.size(); i++)
import java.awt.CheckboxMenuItem;
import java.awt.Cursor;
import java.awt.Dimension;
+import java.awt.Frame;
import java.awt.Panel;
import java.awt.PopupMenu;
import java.awt.event.ComponentAdapter;
try
{
av.getRanges().removePropertyChangeListener(this);
+ Frame parent = (Frame) getParent();
+ parent.dispose();
+ parent.setVisible(false);
} finally
{
av = null;
if (annotationPanel != null)
{
annotationPanel.dispose();
+ annotationPanel = null;
}
if (av != null)
*/
protected void closeChildFrames()
{
+ if (overviewPanel != null)
+ {
+ overviewPanel.dispose();
+ overviewPanel = null;
+ }
if (calculationDialog != null)
{
calculationDialog.closeFrame();
+ calculationDialog = null;
}
}
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.beans.PropertyChangeEvent;
+import java.beans.PropertyVetoException;
import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
{
try
{
- av.getRanges().removePropertyChangeListener(this);
+ if (av != null)
+ {
+ av.getRanges().removePropertyChangeListener(this);
+ }
+
+ /*
+ * close the parent frame (which also removes it from the
+ * Desktop Windows menu)
+ */
+ ((JInternalFrame) SwingUtilities.getAncestorOfClass(
+ JInternalFrame.class, (this))).setClosed(true);
+ } catch (PropertyVetoException e)
+ {
+ // ignore
} finally
{
av = null;