private static final FirstPanel INSTANCE = FirstPanel.init();\r
\r
private String startpath;\r
- private ModuleInfo mi;\r
\r
private JButton moduleButton, goButton, msaEditorButton, criticButton, specifyCommentButton;\r
private JTextField moduletext;\r
private JTextArea log;\r
- private JFileChooser fc;\r
+ private JFileChooser fc = new JFileChooser();\r
private JCheckBox filebox, screenbox, mibox, criticbox, defaultpathbox;\r
\r
private boolean tofile = true, toscreen = true;\r
cst.fill = GridBagConstraints.BOTH;\r
gridbag.setConstraints(logScrollPane, cst);\r
add(logScrollPane);\r
- \r
- fc = new JFileChooser();\r
- fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r
}\r
\r
//---------------------------------------------------------------------------------------//\r
\r
//---------------------------------------------------------------------------------------//\r
\r
- public String getFilepath(String title) {\r
+ public String getFilepath(String title, int mode) {\r
fc.setDialogTitle(title);\r
+ fc.setFileSelectionMode(mode);\r
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\r
log.append(fc.getSelectedFile().getAbsolutePath() + "\n");\r
return fc.getSelectedFile().getAbsolutePath();\r
\r
public void actionPerformed(ActionEvent e) {\r
if ( e.getSource() == moduleButton ) {\r
- startpath = getFilepath("Please choose a starting path");\r
+ startpath = getFilepath("Please choose a starting path", JFileChooser.DIRECTORIES_ONLY);\r
moduletext.setText(startpath);\r
}\r
if ( e.getSource() == goButton ) {\r
}\r
if ( e.getSource() == msaEditorButton) {\r
try {\r
- MsaTreeEditor.init(mi, this);\r
+ MsaTreeEditor.init();\r
} catch (Exception en) {\r
println(en.getMessage());\r
}\r