Class LinkAnimation

java.lang.Object
nl.tudelft.simulation.dsol.animation.d2.Renderable2d<L>
org.opentrafficsim.draw.OtsRenderable<LinkAnimation.LinkData>
org.opentrafficsim.draw.network.LinkAnimation
All Implemented Interfaces:
Serializable, nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<LinkAnimation.LinkData>

public class LinkAnimation extends OtsRenderable<LinkAnimation.LinkData>
Draws LinkData.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Wouter Schakel
See Also:
  • Constructor Details

    • LinkAnimation

      public LinkAnimation(LinkAnimation.LinkData link, nl.tudelft.simulation.naming.context.Contextualized contextualized, float width)
      Parameters:
      link - link data.
      contextualized - context provider.
      width - width
  • Method Details

    • setDynamic

      public LinkAnimation setDynamic(boolean dynamic)
      Sets the animation as dynamic, obtaining geometry at each draw.
      Parameters:
      dynamic - whether it is dynamic false by default.
      Returns:
      for method chaining.
    • paint

      public final void paint(Graphics2D graphics, ImageObserver observer)
      Specified by:
      paint in class nl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>
    • destroy

      public void destroy(nl.tudelft.simulation.naming.context.Contextualized contextProvider)
      Specified by:
      destroy in interface nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<LinkAnimation.LinkData>
      Overrides:
      destroy in class nl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>
    • toString

      public final String toString()
      Overrides:
      toString in class nl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>