*/
public class Preferences extends GPreferences
{
+ // suggested list delimiter character
+ public static final String COMMA = ",";
+
+ public static final String HMMSEARCH_SEQCOUNT = "HMMSEARCH_SEQCOUNT";
+
+ public static final String HMMINFO_GLOBAL_BACKGROUND = "HMMINFO_GLOBAL_BACKGROUND";
+
+ public static final String HMMALIGN_TRIM_TERMINI = "HMMALIGN_TRIM_TERMINI";
+
public static final String ENABLE_SPLIT_FRAME = "ENABLE_SPLIT_FRAME";
public static final String SCALE_PROTEIN_TO_CDNA = "SCALE_PROTEIN_TO_CDNA";
public static final String CYGWIN_PATH = "CYGWIN_PATH";
- public static final String HMMSEARCH_DB_PATHS = "HMMSEARCH_DB_PATHS";
-
public static final String HMMSEARCH_DBS = "HMMSEARCH_DBS";
public static final String SORT_ANNOTATIONS = "SORT_ANNOTATIONS";
/*
* Set HMMER tab defaults
*/
- hmmrTrimTermini.setSelected(Cache.getDefault("TRIM_TERMINI", false));
- if (Cache.getDefault("USE_UNIPROT", false))
+ hmmrTrimTermini.setSelected(Cache.getDefault(HMMALIGN_TRIM_TERMINI, false));
+ if (Cache.getDefault(HMMINFO_GLOBAL_BACKGROUND, false))
{
hmmerBackgroundUniprot.setSelected(true);
}
hmmerBackgroundAlignment.setSelected(true);
}
hmmerSequenceCount
- .setText(Cache.getProperty("SEQUENCES_TO_KEEP"));
+ .setText(Cache.getProperty(HMMSEARCH_SEQCOUNT));
hmmerPath.setText(Cache.getProperty(HMMER_PATH));
hmmerPath.addActionListener(new ActionListener()
{
validateHmmerPath();
}
});
- cygwinPath.setText(Cache.getProperty(CYGWIN_PATH));
- cygwinPath.addActionListener(new ActionListener()
+ if (cygwinPath != null)
{
- @Override
- public void actionPerformed(ActionEvent e)
+ String path = Cache.getProperty(CYGWIN_PATH);
+ if (path == null)
{
- validateCygwinPath();
+ path = FileUtils.getPathTo("bash");
}
- });
- cygwinPath.addFocusListener(new FocusAdapter()
- {
- @Override
- public void focusLost(FocusEvent e)
+ cygwinPath.setText(path);
+ cygwinPath.addActionListener(new ActionListener()
{
- validateCygwinPath();
- }
- });
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ validateCygwinPath();
+ }
+ });
+ cygwinPath.addFocusListener(new FocusAdapter()
+ {
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ validateCygwinPath();
+ }
+ });
+ }
/*
* Set Visual tab defaults
/*
* Save HMMER settings
*/
- Cache.applicationProperties.setProperty("TRIM_TERMINI",
+ Cache.applicationProperties.setProperty(HMMALIGN_TRIM_TERMINI,
Boolean.toString(hmmrTrimTermini.isSelected()));
- Cache.applicationProperties.setProperty("USE_UNIPROT",
+ Cache.applicationProperties.setProperty(HMMINFO_GLOBAL_BACKGROUND,
Boolean.toString(hmmerBackgroundUniprot.isSelected()));
- Cache.applicationProperties.setProperty("SEQUENCES_TO_KEEP",
+ Cache.applicationProperties.setProperty(HMMSEARCH_SEQCOUNT,
hmmerSequenceCount.getText());
Cache.setOrRemove(HMMER_PATH, hmmerPath.getText());
- Cache.setOrRemove(CYGWIN_PATH, cygwinPath.getText());
+ if (cygwinPath != null)
+ {
+ Cache.setOrRemove(CYGWIN_PATH, cygwinPath.getText());
+ }
AlignFrame[] frames = Desktop.getAlignFrames();
if (frames != null && frames.length > 0)
{
}
}
- hmmrTrimTermini.setSelected(Cache.getDefault("TRIM_TERMINI", false));
- if (Cache.getDefault("USE_UNIPROT", false))
+ hmmrTrimTermini.setSelected(Cache.getDefault(HMMALIGN_TRIM_TERMINI, false));
+ if (Cache.getDefault(HMMINFO_GLOBAL_BACKGROUND, false))
{
hmmerBackgroundUniprot.setSelected(true);
}
hmmerBackgroundAlignment.setSelected(true);
}
hmmerSequenceCount
- .setText(Cache.getProperty("SEQUENCES_TO_KEEP"));
+ .setText(Cache.getProperty(HMMSEARCH_SEQCOUNT));
hmmerPath.setText(Cache.getProperty(HMMER_PATH));
/*