public class OverviewRenderer
{
+ public static final String UPDATE = "OverviewUpdate";
+
// transparency of hidden cols/seqs overlay
private static final float TRANSPARENCY = 0.5f;
- public static final String UPDATE = "OverviewUpdate";
-
private static final int MAX_PROGRESS = 100;
- final static int STATE_INIT = 0;
+ private static final int STATE_INIT = 0;
- final static int STATE_NEXT = 1;
+ private static final int STATE_NEXT = 1;
- final static int STATE_DONE = 2;
+ private static final int STATE_DONE = 2;
private int state;
private AlignmentViewPanel panel;
- // private int sequencesHeight;
+ private int ndone = 0;
+
+ private AlignmentRowsCollectionI rows;
+
+ private AlignmentColsCollectionI cols;
+
+ private Iterator<Integer> rowIterator;
+
+ private int alignmentHeight;
+
+ private int totalPixels;
+
+ private int lastRowUpdate;
+
+ private int lastUpdate;
+
+ private int[] pixels;
+
+ private BitSet bscol;
+
+ private final int w;
+
+ private final int h;
public OverviewRenderer(AlignmentViewPanel panel,
jalview.api.FeatureRenderer fr, OverviewDimensions od,
AlignmentI alignment, ResidueShaderI resshader,
OverviewResColourFinder colFinder, boolean showProgress)
{
- {
- this.panel = panel;
- finder = new FeatureColourFinder(fr);
- al = alignment;
- shader = resshader;
- resColFinder = colFinder;
- this.showProgress = showProgress;
-
- w = od.getWidth();
- h = od.getHeight();
- rows = od.getRows(alignment);
- cols = od.getColumns(alignment);
- graphHeight = od.getGraphHeight();
- alignmentHeight = od.getSequencesHeight();
-
- pixelsPerSeq = od.getPixelsPerSeq();
- pixelsPerCol = od.getPixelsPerCol();
- colsPerPixel = Math.max(1, 1f / pixelsPerCol);
-
- skippingColumns = (pixelsPerCol < 1);
-
- }
+ this.panel = panel;
+ finder = new FeatureColourFinder(fr);
+ al = alignment;
+ shader = resshader;
+ resColFinder = colFinder;
+ this.showProgress = showProgress;
+
+ w = od.getWidth();
+ h = od.getHeight();
+ rows = od.getRows(alignment);
+ cols = od.getColumns(alignment);
+ graphHeight = od.getGraphHeight();
+ alignmentHeight = od.getSequencesHeight();
+
+ pixelsPerSeq = od.getPixelsPerSeq();
+ pixelsPerCol = od.getPixelsPerCol();
+ colsPerPixel = Math.max(1, 1f / pixelsPerCol);
+
+ skippingColumns = (pixelsPerCol < 1);
}
/**
: Math.round(icol * pixelsPerCol), w);
}
- private ActionListener listener = new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- mainLoop();
- }
-
- };
-
private boolean loop()
{
if (delay <= 0)
}
if (timer == null)
{
- timer = new Timer(delay, listener);
+ timer = new Timer(delay, new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ mainLoop();
+ }
+ });
timer.setRepeats(false);
timer.start();
}
panel.overviewDone(miniMe);
}
- int ndone = 0;
-
- private AlignmentRowsCollectionI rows;
-
- private AlignmentColsCollectionI cols;
-
- Iterator<Integer> rowIterator;
-
- int alignmentHeight;
-
- int totalPixels;
-
- int lastRowUpdate;
-
- int lastUpdate;
-
- int[] pixels;
-
- BitSet bscol;
-
- int w, h;
-
/*
* Calculate progress update value and fire event
* @param rowOffset number of rows to offset calculation by