Class UtilitiesDemo

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class UtilitiesDemo
extends JFrame
This class serves as a demo of how the compomics-utilities library can be used in other projects. It contains several demos, and is also the frame shown if the compomics-utilities jar file is double clicked or ran from the command line.
Author:
Harald Barsnes
See Also:
Serialized Form
  • Constructor Details

    • UtilitiesDemo

      public UtilitiesDemo()
      Creates a new UtilitiesDemo frame and makes it visible.
  • Method Details

    • formatProteinSequence

      public double formatProteinSequence()
      Formats the protein sequence such that both the covered parts of the sequence and the peptide selected in the peptide table is highlighted, and any modifications and variants of a PEFF file.
      Returns:
      the sequence coverage in percent
    • main

      public static void main​(String[] args)
      Starts the UtilitiesDemo.
      Parameters:
      args - the command line arguments
    • getPreferredColumnWidth

      public int getPreferredColumnWidth​(JTable table, int colIndex, int margin)
      Gets the preferred width of the column specified by vColIndex. The column will be just wide enough to show the column head and the widest cell in the column. Margin pixels are added to the left and right (resulting in an additional width of 2*margin pixels.
      Parameters:
      table - the table
      colIndex - the colum index
      margin - the margin to add
      Returns:
      the preferred width of the column