public class AlignmentRenderer extends SequenceRendererWrapper
SequenceRenderer.RendererForwarder
Modifier and Type | Field and Description |
---|---|
static ChangeType |
LABEL |
RENDERER
Constructor and Description |
---|
AlignmentRenderer() |
Modifier and Type | Method and Description |
---|---|
SequenceRenderContext |
contextForLabel(SequenceRenderContext src,
String label) |
double |
getDepth(SequenceRenderContext ctx)
Retrieve the depth of this renderer when rendering src.
|
String |
getLabel() |
double |
getMinimumLeader(SequenceRenderContext ctx)
Retrieve the minimum leading distance for this renderer when rendering src.
|
double |
getMinimumTrailer(SequenceRenderContext ctx)
Retrieve the minimum trailing distance for this renderer when rendering src.
|
void |
paint(Graphics2D g,
SequenceRenderContext ctx)
Render a portion (possibly all) of the information for src to g, displaying
all of the data that would fall within seqBox.
|
void |
setLabel(String label) |
getChangeSupport, getRenderer, processMouseEvent, setRenderer
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
public static ChangeType LABEL
public AlignmentRenderer()
public void setLabel(String label) throws ChangeVetoException
ChangeVetoException
public double getDepth(SequenceRenderContext ctx)
SequenceRenderer
The depth may vary between sequence panels - for example based upon sequence length. Each line of information in the SequenceRendererContext only renders a region of the sequence. The depth for one complete line may be different from that for another due to the sequence having more or less information in that region to show. For example, a feature renderer implementation may chose to collapse down to a depth of zero pixels if there are no features to render within a region.
getDepth
in interface SequenceRenderer
getDepth
in class SequenceRendererWrapper
ctx
- the SequenceRenderContext to return info forpublic double getMinimumLeader(SequenceRenderContext ctx)
SequenceRenderer
The leading distance may vary between sequence panels - for example based upon sequence length.
getMinimumLeader
in interface SequenceRenderer
getMinimumLeader
in class SequenceRendererWrapper
ctx
- the SequenceRenderContext to return info forpublic double getMinimumTrailer(SequenceRenderContext ctx)
SequenceRenderer
The trailing distance may vary between sequence panels - for example based upon sequence length.
getMinimumTrailer
in interface SequenceRenderer
getMinimumTrailer
in class SequenceRendererWrapper
ctx
- the SequenceRenderContext to return info forpublic void paint(Graphics2D g, SequenceRenderContext ctx)
SequenceRenderer
paint
in interface SequenceRenderer
paint
in class SequenceRendererWrapper
g
- the Graphics2D to render toctx
- the SequenceRenderContext that encapsulates the information to renderpublic SequenceRenderContext contextForLabel(SequenceRenderContext src, String label)
Copyright © 2014 BioJava. All rights reserved.