Class LayeredRenderer


  • public class LayeredRenderer
    extends Object
    LayeredRenderer handles the lane offsets for MultiLineRenders. For each successive lane it translates the Graphics2D perpendicular to the sequence rendering direction by an amount equal to the value returned by the getDepth() method of that lane's renderer.
    Since:
    1.1
    Author:
    Matthew Pocock, Keith James
    • Field Detail

      • INSTANCE

        public static final LayeredRenderer INSTANCE
        Static LayeredRenderer INSTANCE used by MultiLineRenderers.
    • Method Detail

      • getDepth

        public double getDepth​(List srcL,
                               List renderers)
        getDepth returns the total depth of a list of SequenceRenderers.
        Parameters:
        srcL - a List of SequenceRenderContexts.
        renderers - a List of SequenceRenderers.
        Returns:
        a double.
      • getMinimumLeader

        public double getMinimumLeader​(List srcL,
                                       List renderers)
        getMinimumLeader returns the maximum value of getMinimumLeader() for a list of SequenceRenderers.
        Parameters:
        srcL - a List of SequenceRenderContexts.
        renderers - a List of SequenceRenderers.
        Returns:
        a double.
      • getMinimumTrailer

        public double getMinimumTrailer​(List srcL,
                                        List renderers)
        getMinimumTrailer returns the maximum value of getMinimumTrailer() for a list of SequenceRenderers.
        Parameters:
        srcL - a List of SequenceRenderContexts.
        renderers - a List of SequenceRenderers.
        Returns:
        a double.