Package org.opentrafficsim.draw.road
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:
 Serializable,Renderable2DInterface<T>
- Direct Known Subclasses:
 BusStopAnimation,ConflictAnimation,DestinationAnimation,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-2020 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
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
Renderable2DInterface.Util 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AbstractLineAnimation(T source, SimulatorInterface.TimeDoubleUnit simulator, double length, Length width)Construct the line animation. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetHalfLength()Returns half the length.voidpaint(Graphics2D graphics, ImageObserver observer)- 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, destroy, equals, getSource, hashCode, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslate, toString 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AbstractLineAnimation
public AbstractLineAnimation(T source, SimulatorInterface.TimeDoubleUnit simulator, double length, Length width) throws NamingException, RemoteException
Construct the line animation.- Parameters:
 source- T; sourcesimulator- SimulatorInterface.TimeDoubleUnit; the simulator to schedule onlength- double; length of the line, as fraction of the lane widthwidth- Length; line width- Throws:
 NamingException- in case of registration failure of the animationRemoteException- in case of remote registration failure of the animation
 
 - 
 
- 
Method Detail
- 
getHalfLength
public final double getHalfLength()
Returns half the length.- Returns:
 - half the length
 
 
- 
paint
public void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
- Specified by:
 paintin classRenderable2D<T extends LaneBasedObject>- Throws:
 RemoteException
 
 - 
 
 -