Class LinkAnimation

java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<org.opentrafficsim.core.network.Link>
org.opentrafficsim.draw.network.LinkAnimation
All Implemented Interfaces:
Serializable, nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<org.opentrafficsim.core.network.Link>

public class LinkAnimation extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D<org.opentrafficsim.core.network.Link> implements nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<org.opentrafficsim.core.network.Link>, Serializable
Draws a Link.

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
    class 
    Text animation for the Link.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LinkAnimation(org.opentrafficsim.core.network.Link link, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, float width)
     
  • 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

    • LinkAnimation

      public LinkAnimation(org.opentrafficsim.core.network.Link link, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, float width) throws NamingException, RemoteException
      Parameters:
      link - Link; Link
      simulator - OtsSimulatorInterface; simulator
      width - float; width
      Throws:
      NamingException - for problems with registering in context
      RemoteException - on communication failure
  • Method Details

    • paint

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

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

      public final String toString()
      Overrides:
      toString in class nl.tudelft.simulation.dsol.animation.D2.Renderable2D<org.opentrafficsim.core.network.Link>