private AlignViewport av;
- private AlignmentPanel ap;
-
// Can set different properties in this seqCanvas than
// main visible SeqCanvas
private SequenceRenderer sr;
private Frame nullFrame;
public OverviewCanvas(OverviewDimensions overviewDims,
- AlignViewport alignvp, AlignmentPanel alignp)
+ AlignViewport alignvp)
{
od = overviewDims;
- av = alignp.av;
- ap = alignp;
+ av = alignvp;
nullFrame = new Frame();
nullFrame.addNotify();
}
}
- public void draw(boolean showSequenceFeatures, boolean showAnnotation)
+ public void draw(boolean showSequenceFeatures, boolean showAnnotation,
+ AlignmentPanel ap)
{
miniMe = null;
if (restart)
{
restart = false;
- draw(showSequenceFeatures, showAnnotation);
+ draw(showSequenceFeatures, showAnnotation, ap);
}
else
{
od = new OverviewDimensions(av.getRanges(),
(av.isShowAnnotation() && av.getSequenceConsensusHash() != null));
- oviewCanvas = new OverviewCanvas(od, av, ap);
+ oviewCanvas = new OverviewCanvas(od, av);
setLayout(new BorderLayout());
add(oviewCanvas, BorderLayout.CENTER);
{
oviewCanvas.draw(av.isShowSequenceFeatures(),
(av.isShowAnnotation() && av
- .getAlignmentConservationAnnotation() != null));
+ .getAlignmentConservationAnnotation() != null), ap);
setBoxPosition();
}
.getHiddenSequences(), av.getColumnSelection(), av.getRanges());
repaint();
}
-
-
-
-
}
private BufferedImage lastMiniMe = null;
-
-
// Can set different properties in this seqCanvas than
// main visible SeqCanvas
private SequenceRenderer sr;
OverviewDimensions od;
- AlignViewport av;
-
- AlignmentPanel ap;
+ AlignViewportI av;
public OverviewCanvas(OverviewDimensions overviewDims,
- AlignViewportI alignvp, AlignmentPanel alignp)
+ AlignViewportI alignvp)
{
od = overviewDims;
- av = alignp.av;
- ap = alignp;
+ av = alignvp;
sr = new SequenceRenderer(av);
sr.renderGaps = false;
sr.forOverview = true;
- fr = new FeatureRenderer(ap);
+ fr = new jalview.renderer.seqfeatures.FeatureRenderer(av);
}
/*
}
}
- public void draw(boolean showSequenceFeatures, boolean showAnnotation)
+ public void draw(boolean showSequenceFeatures, boolean showAnnotation,
+ FeatureRenderer transferRenderer)
{
miniMe = null;
if (showSequenceFeatures)
{
- fr.transferSettings(ap.getSeqPanel().seqCanvas.getFeatureRenderer());
+ fr.transferSettings(transferRenderer);
}
// why do we need to set preferred size again? was set in
if (restart)
{
restart = false;
- draw(showSequenceFeatures, showAnnotation);
+ draw(showSequenceFeatures, showAnnotation, transferRenderer);
}
else
{
(av.isShowAnnotation() && av
.getAlignmentConservationAnnotation() != null));
- oviewCanvas = new OverviewCanvas(od, av, ap);
+ oviewCanvas = new OverviewCanvas(od, av);
setLayout(new BorderLayout());
add(oviewCanvas, BorderLayout.CENTER);
{
oviewCanvas.draw(av.isShowSequenceFeatures(),
(av.isShowAnnotation() && av
- .getAlignmentConservationAnnotation() != null));
+ .getAlignmentConservationAnnotation() != null), ap
+ .getSeqPanel().seqCanvas.getFeatureRenderer());
setBoxPosition();
}
*/
package jalview.gui;
+import jalview.api.AlignViewportI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.renderer.ResidueShaderI;
{
final static int CHAR_TO_UPPER = 'A' - 'a';
- AlignViewport av;
+ AlignViewportI av;
FontMetrics fm;
*
* @param viewport
*/
- public SequenceRenderer(AlignViewport viewport)
+ public SequenceRenderer(AlignViewportI viewport)
{
this.av = viewport;
}
drawBoxes(seq, start, end, y1);
- if (av.validCharWidth)
+ if (av.isValidCharWidth())
{
drawText(seq, start, end, y1);
}