Package org.biojava.bio.gui.sequence
Class LayeredRenderer
- java.lang.Object
-
- org.biojava.bio.gui.sequence.LayeredRenderer
-
public class LayeredRenderer extends Object
LayeredRenderer
handles the lane offsets forMultiLineRender
s. For each successive lane it translates theGraphics2D
perpendicular to the sequence rendering direction by an amount equal to the value returned by thegetDepth()
method of that lane's renderer.- Since:
- 1.1
- Author:
- Matthew Pocock, Keith James
-
-
Field Summary
Fields Modifier and Type Field Description static LayeredRenderer
INSTANCE
StaticLayeredRenderer
INSTANCE
used byMultiLineRenderer
s.
-
Constructor Summary
Constructors Constructor Description LayeredRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDepth(List srcL, List renderers)
getDepth
returns the total depth of a list ofSequenceRenderer
s.double
getMinimumLeader(List srcL, List renderers)
getMinimumLeader
returns the maximum value of getMinimumLeader() for a list ofSequenceRenderer
s.double
getMinimumTrailer(List srcL, List renderers)
getMinimumTrailer
returns the maximum value of getMinimumTrailer() for a list ofSequenceRenderer
s.void
paint(Graphics2D g, List srcL, List renderers)
SequenceViewerEvent
processMouseEvent(List srcL, MouseEvent me, List path, List renderers)
-
-
-
Field Detail
-
INSTANCE
public static final LayeredRenderer INSTANCE
StaticLayeredRenderer
INSTANCE
used byMultiLineRenderer
s.
-
-
Constructor Detail
-
LayeredRenderer
public LayeredRenderer()
-
-
Method Detail
-
getDepth
public double getDepth(List srcL, List renderers)
getDepth
returns the total depth of a list ofSequenceRenderer
s.- Parameters:
srcL
- aList
ofSequenceRenderContext
s.renderers
- aList
ofSequenceRenderer
s.- Returns:
- a
double
.
-
getMinimumLeader
public double getMinimumLeader(List srcL, List renderers)
getMinimumLeader
returns the maximum value of getMinimumLeader() for a list ofSequenceRenderer
s.- Parameters:
srcL
- aList
ofSequenceRenderContext
s.renderers
- aList
ofSequenceRenderer
s.- Returns:
- a
double
.
-
getMinimumTrailer
public double getMinimumTrailer(List srcL, List renderers)
getMinimumTrailer
returns the maximum value of getMinimumTrailer() for a list ofSequenceRenderer
s.- Parameters:
srcL
- aList
ofSequenceRenderContext
s.renderers
- aList
ofSequenceRenderer
s.- Returns:
- a
double
.
-
paint
public void paint(Graphics2D g, List srcL, List renderers)
-
processMouseEvent
public SequenceViewerEvent processMouseEvent(List srcL, MouseEvent me, List path, List renderers)
-
-