//ToolTip toolTip;

        public SequenceCoverageSurface(SequenceCoverageControl owner)
        {
            this.owner       = owner;
            headerComponents = new List <string>
            {
                owner.Protein.Description,
                owner.Protein.Length + " residues,",
                (new proteome.Peptide(owner.Protein.Sequence).molecularWeight() / 1000).ToString(
                    "f3") + " kDa (MW),",
                owner.Protein.Coverage.ToString("f1") + "% coverage"
            };
            header = String.Format("{0}\r\n{1} {2} {3}",
                                   headerComponents[0],
                                   headerComponents[1],
                                   headerComponents[2],
                                   headerComponents[3]);
            DoubleBuffered = true;
            ResizeRedraw   = true;
            AutoSize       = true;
            AutoSizeMode   = AutoSizeMode.GrowAndShrink;

            //toolTip = new ToolTip() { Active = true, ShowAlways = true, InitialDelay = 100, ReshowDelay = 100, AutoPopDelay = 0 };

            calculateBoundingInfo();

            filteredInOffsets = new bool[owner.Protein.Length];
        }
        public SequenceCoverageForm (NHibernate.ISession session, DataModel.Protein protein, DataFilter viewFilter)
        {
            StartPosition = FormStartPosition.CenterParent;
            ShowIcon = false;
            WindowState = FormWindowState.Maximized;
            Text = protein.Accession;

            ResizeRedraw = true;
            DoubleBuffered = true;

            BackColor = SystemColors.Window;

            control = new SequenceCoverageControl(session, protein, viewFilter)
            {
                Dock = DockStyle.Fill,
                BackColor = this.BackColor
            };

            control.SequenceCoverageFilter += (s, e) => OnSequenceCoverageFilter(e);

            Controls.Add(control);
        }
        public SequenceCoverageForm(NHibernate.ISession session, DataModel.Protein protein, DataFilter viewFilter)
        {
            StartPosition = FormStartPosition.CenterParent;
            ShowIcon      = false;
            WindowState   = FormWindowState.Maximized;
            Text          = protein.Accession;

            ResizeRedraw   = true;
            DoubleBuffered = true;

            BackColor = SystemColors.Window;

            control = new SequenceCoverageControl(session, protein, viewFilter)
            {
                Dock      = DockStyle.Fill,
                BackColor = this.BackColor
            };

            control.SequenceCoverageFilter += (s, e) => OnSequenceCoverageFilter(e);

            Controls.Add(control);
        }
        //ToolTip toolTip;

        public SequenceCoverageSurface (SequenceCoverageControl owner)
        {
            this.owner = owner;
            headerComponents = new List<string>
                                   {
                                       owner.Protein.Description,
                                       owner.Protein.Length + " residues,",
                                       (new proteome.Peptide(owner.Protein.Sequence).molecularWeight()/1000).ToString(
                                           "f3") + " kDa (MW),",
                                       owner.Protein.Coverage.ToString("f1") + "% coverage"
                                   };
            header = String.Format("{0}\r\n{1} {2} {3}",
                                   headerComponents[0],
                                   headerComponents[1],
                                   headerComponents[2],
                                   headerComponents[3]);
            DoubleBuffered = true;
            ResizeRedraw = true;
            AutoSize = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;

            //toolTip = new ToolTip() { Active = true, ShowAlways = true, InitialDelay = 100, ReshowDelay = 100, AutoPopDelay = 0 };

            calculateBoundingInfo();

            filteredInOffsets = new bool[owner.Protein.Length];
        }