Class SequenceDbDetailsDialog

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.compomics.util.gui.parameters.identification.search.SequenceDbDetailsDialog
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class SequenceDbDetailsDialog
extends JDialog
This dialog displays information about a sequence database.
Author:
Marc Vaudel, Harald Barsnes
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • SequenceDbDetailsDialog

      public SequenceDbDetailsDialog​(Dialog owner, Frame parent, String selectedFastaFile, FastaParameters fastaParameters, LastSelectedFolder lastSelectedFolder, boolean dbEditable, Image normalImange, Image waitingImage)
      Creates a new SequenceDbDetailsDialog with a dialog as owner.
      Parameters:
      owner - the dialog owner
      parent - the parent frame
      selectedFastaFile - the selected FASTA file
      fastaParameters - the parameters used to parse the FASTA file
      lastSelectedFolder - the last selected folder
      dbEditable - if the database is editable
      normalImange - the normal icon
      waitingImage - the waiting icon
    • SequenceDbDetailsDialog

      public SequenceDbDetailsDialog​(Frame parent, String selectedFastaFile, FastaParameters fastaParameters, LastSelectedFolder lastSelectedFolder, boolean dbEditable, Image normalImange, Image waitingImage)
      Creates a new SequenceDbDetailsDialog.
      Parameters:
      parent - the parent frame
      selectedFastaFile - the selected FASTA file
      fastaParameters - the parameters used to parse the FASTA file
      lastSelectedFolder - the last selected folder
      dbEditable - if the database is editable
      normalImange - the normal icon
      waitingImage - the waiting icon
  • Method Details

    • getLastSelectedFolder

      public String getLastSelectedFolder()
      Returns the last selected folder.
      Returns:
      the last selected folder
    • selectDB

      public boolean selectDB​(boolean userCanDispose)
      Allows the user to select a FASTA file, loads its information, and returns a boolean indicating whether the process loading was successful.
      Parameters:
      userCanDispose - if true, the dialog is closed if the user cancels the selection
      Returns:
      a boolean indicating whether a valid FASTA file was selected
    • renameFastaFileName

      public File renameFastaFileName​(File file)
      Copies the content of the FASTA file to a new file and replaces any white space in the file name with '_' instead. Returns the new file, null if an error occurred.
      Parameters:
      file - the FASTA file to rename
      Returns:
      the renamed FASTA file
    • getSelectedFastaFile

      public String getSelectedFastaFile()
      Returns the selected FASTA file.
      Returns:
      the selected FASTA file
    • getFastaParameters

      public FastaParameters getFastaParameters()
      Returns the FASTA parameters.
      Returns:
      the FASTA parameters
    • isCanceled

      public boolean isCanceled()
      Returns a boolean indicating whether the database selection was canceled by the user.
      Returns:
      a boolean indicating whether the database selection was canceled by the user