package org.broad.igv.feature.basepair;

import org.apache.log4j.Logger;
import org.broad.igv.feature.genome.*;
import org.broad.igv.renderer.*;
import org.broad.igv.track.AbstractTrack;
import org.broad.igv.track.RenderContext;
import org.broad.igv.util.ResourceLocator;

import java.awt.*;

/**
 * Show base-pairing arcs
 *
 * @author sbusan
 */
public class BasePairTrack extends AbstractTrack {

    private static Logger log = Logger.getLogger(BasePairTrack.class);

    private BasePairRenderer basePairRenderer = new BasePairRenderer();
    private BasePairData basePairData;

    public BasePairTrack(ResourceLocator locator, String id, String name, Genome genome) {
        super(locator, id, name);
        basePairData = BasePairFileParser.loadData(locator, genome);
    }

    public void render(RenderContext context, Rectangle rect) {
        basePairRenderer.draw(basePairData, context, rect);
    }

    public Renderer getRenderer() {
        return null;
    }

    public int getDirection(){
        return basePairRenderer.getDirection();
    }

    public void setDirection(int d){
        basePairRenderer.setDirection(d);
    }
}
@@ -901,32 +901,693 @@
 , rect);%0A    %7D%0A%0A
+%0A    public void checkHeight(RenderContext context, Rectangle rect) %7B%0A%0A        java.util.List%3CBasePairFeature%3E featureList = basePairData.getFeatures(context.getChr());%0A%0A        if (featureList != null) %7B%0A            int maxL = 0;%0A            for (BasePairFeature feature : featureList) %7B%0A                //if(feature.startLeft %3E context.getEndLocation()) break;%0A                //else if(feature.endRight %3C context.getOrigin()) continue;%0A                maxL = Math.max(maxL, feature.getEndRight() - feature.getStartLeft());%0A            %7D%0A            int height = (int) (maxL / (2 * context.getScale()));%0A            setHeight(height, true);%0A%0A        %7D%0A    %7D%0A%0A
     public Rende
@@ -1663,16 +1663,17 @@
 ection()
+ 
 %7B%0A      
@@ -1756,16 +1756,17 @@
 n(int d)
+ 
 %7B%0A      
@@ -1807,9 +1807,10 @@
 ;%0A    %7D%0A
-
 %7D
+%0A

Add a method to check and adjust the height of a BasePairTrack. Method is currently not used.