Class AbstractLineAnimation<T extends LaneBasedObject>

java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<T>
org.opentrafficsim.draw.road.AbstractLineAnimation<T>
Type Parameters:
T - the LaneBasedObject class of the source that indicates the location of the Renderable on the screen
All Implemented Interfaces:
Renderable2DInterface<T>
Direct Known Subclasses:
BusStopAnimation, ConflictAnimation, SensorAnimation, SinkAnimation, TrafficLightAnimation

public abstract class AbstractLineAnimation<T extends LaneBasedObject>
extends Renderable2D<T>
Abstract class for objects that draw a line perpendicular on the lane.

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

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version 25 jan. 2017
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • AbstractLineAnimation

      public AbstractLineAnimation​(T source, SimulatorInterface.TimeDoubleUnit simulator, double length, Length width) throws javax.naming.NamingException, java.rmi.RemoteException
      Construct the line animation.
      Parameters:
      source - T; source
      simulator - SimulatorInterface.TimeDoubleUnit; the simulator to schedule on
      length - double; length of the line, as fraction of the lane width
      width - Length; line width
      Throws:
      javax.naming.NamingException - in case of registration failure of the animation
      java.rmi.RemoteException - in case of remote registration failure of the animation
  • Method Details

    • getHalfLength

      public final double getHalfLength()
      Returns half the length.
      Returns:
      half the length
    • paint

      public void paint​(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer) throws java.rmi.RemoteException
      Specified by:
      paint in class Renderable2D<T extends LaneBasedObject>
      Throws:
      java.rmi.RemoteException