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 Details

    • 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 Details

    • actionPerformed

      public void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener
    • 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