Class LaneAnimation

java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane>
org.opentrafficsim.draw.road.LaneAnimation
All Implemented Interfaces:
Serializable, nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<Lane>

public class LaneAnimation extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane> implements nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<Lane>, Serializable

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

Author:
Alexander Verbraeck
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Draw center line of a lane.
    static class 
    Animation for center line of a lane.
    class 
    Text animation for the Node.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LaneAnimation(Lane lane, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, Color color)
    Animate a Lane.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy(Contextualized contextProvider)
     
    final void
    paint(Graphics2D graphics, ImageObserver observer)
    final String

    Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D

    bind2Context, contains, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface

    contains, getId, getSource, paintComponent
  • Constructor Details

    • LaneAnimation

      public LaneAnimation(Lane lane, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, Color color) throws NamingException, RemoteException
      Animate a Lane.
      Parameters:
      lane - Lane; the lane
      simulator - OtsSimulatorInterface; the simulator
      color - Color; Color of the lane.
      Throws:
      NamingException - in case of registration failure of the animation
      RemoteException - on communication failure
  • Method Details

    • getText

      public final LaneAnimation.Text getText()
      Returns:
      text.
    • paint

      public final void paint(Graphics2D graphics, ImageObserver observer)
      Specified by:
      paint in class nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane>
    • destroy

      public void destroy(Contextualized contextProvider)
      Specified by:
      destroy in interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<Lane>
      Overrides:
      destroy in class nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane>
    • toString

      public final String toString()
      Overrides:
      toString in class nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane>