Class MySaveFileListener
- java.lang.Object
-
- org.biojava.nbio.structure.align.gui.MySaveFileListener
-
- All Implemented Interfaces:
ActionListener
,EventListener
public class MySaveFileListener extends Object implements ActionListener
Save an alignment to a specified File by the user. The alignment to be saved depends on the constructor used to instantiate this class, so that AFPChains and MultipleAlignments can be saved.The format to save the alignment depends on the Frame that generated the Action: from a sequence alignment a FatCat or FASTA formats are saved, and from a Jmol view an XML format is saved.
- Version:
- 2.0 - adapted for MultipleAligments
- Author:
- Aleix Lafita
-
-
Constructor Summary
Constructors Constructor Description MySaveFileListener(AFPChain afpChain)
MySaveFileListener(AFPChain afpChain, MultipleAlignment msa)
Constructor to avoid checking which of the two is null before instantiating this class.MySaveFileListener(MultipleAlignment msa)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent evt)
void
setTextOutput(boolean text)
If true, the alignment format saved will be a text output (FASTA for MultipleAlignments and FatCat for pairwise alignments)
-
-
-
Constructor Detail
-
MySaveFileListener
public MySaveFileListener(AFPChain afpChain)
-
MySaveFileListener
public MySaveFileListener(MultipleAlignment msa)
-
MySaveFileListener
public MySaveFileListener(AFPChain afpChain, MultipleAlignment msa)
Constructor to avoid checking which of the two is null before instantiating this class. One of the two, or both, have to be null. If both are different than null the MultipleAlignment will be saved only.- Parameters:
afpChain
-msa
-
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent evt)
- Specified by:
actionPerformed
in interfaceActionListener
-
setTextOutput
public void setTextOutput(boolean text)
If true, the alignment format saved will be a text output (FASTA for MultipleAlignments and FatCat for pairwise alignments)- Parameters:
text
- if true the output will be text format
-
-