Skip to content
Snippets Groups Projects
Commit 286fe80f authored by tjc's avatar tjc
Browse files

fix opening Artemis

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@10661 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 66339866
No related branches found
No related tags found
No related merge requests found
...@@ -362,38 +362,27 @@ public class CircularGenomeController ...@@ -362,38 +362,27 @@ public class CircularGenomeController
{ {
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
if (lastBlock == null) Range range = null;
{ try
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{ {
final ArtemisMain main_window = new ArtemisMain(null); if (lastBlock == null)
main_window.setVisible(true); range = new Range(1, dna.getArtemisEntryGroup().getBases()
final EntryEdit entryEdit = new EntryEdit(dna .getLength());
.getArtemisEntryGroup());
entryEdit.setVisible(true);
}
});
}
else else
range = new Range(lastBlock.getBstart(), lastBlock.getBend());
}
catch (OutOfRangeException e1)
{ {
try e1.printStackTrace();
{ return;
}
final ArtemisMain main_window = new ArtemisMain(null); final ArtemisMain main_window = new ArtemisMain(null);
main_window.setVisible(true); main_window.setVisible(false);
Range range = new Range(lastBlock.getBstart(), lastBlock.getBend());
final EntryGroup entryGroup = dna.getArtemisEntryGroup().truncate( final EntryGroup entryGroup = dna.getArtemisEntryGroup().truncate(
range); range);
final EntryEdit entryEdit = new EntryEdit(entryGroup); final EntryEdit entryEdit = new EntryEdit(entryGroup);
entryEdit.setVisible(true); entryEdit.setVisible(true);
} }
catch (OutOfRangeException e1)
{
e1.printStackTrace();
}
}
}
}); });
popup.add(openArtemis); popup.add(openArtemis);
...@@ -588,7 +577,8 @@ public class CircularGenomeController ...@@ -588,7 +577,8 @@ public class CircularGenomeController
Box yBox = Box.createVerticalBox(); Box yBox = Box.createVerticalBox();
JTextField enzymeList = new JTextField("HincII,hinfI,ppiI,hindiii"); JTextField enzymeList = new JTextField("HincII,hinfI,ppiI,hindiii");
yBox.add(enzymeList); yBox.add(enzymeList);
JCheckBox methylationCheckBox = new JCheckBox("do not match methylated bases", methylation); JCheckBox methylationCheckBox = new JCheckBox(
"RE sites will not match methylated bases", methylation);
yBox.add(methylationCheckBox); yBox.add(methylationCheckBox);
JOptionPane.showMessageDialog(null, yBox, "Enzyme", JOptionPane.QUESTION_MESSAGE); JOptionPane.showMessageDialog(null, yBox, "Enzyme", JOptionPane.QUESTION_MESSAGE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment