Package org.opentrafficsim.draw.road
Class DetectorAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<T>
org.opentrafficsim.draw.road.AbstractLineAnimation<LaneDetector>
org.opentrafficsim.draw.road.DetectorAnimation
- All Implemented Interfaces:
Serializable,nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<LaneDetector>
public class DetectorAnimation
extends AbstractLineAnimation<LaneDetector>
implements nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<LaneDetector>, Serializable
Detector animation.
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, Peter Knoppers
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDetectorAnimation(LaneDetector detector, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, Color color) Construct a DetectorAnimation. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(Contextualized contextProvider) final DetectorAnimation.TextgetText()final voidpaint(Graphics2D graphics, ImageObserver observer) final StringtoString()Methods inherited from class org.opentrafficsim.draw.road.AbstractLineAnimation
getHalfLengthMethods 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, setTranslateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
contains, getId, getSource, paintComponent
-
Constructor Details
-
DetectorAnimation
public DetectorAnimation(LaneDetector detector, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, Color color) throws NamingException, RemoteException Construct a DetectorAnimation.- Parameters:
detector- Detector; the Sensor to drawsimulator- OtsSimulatorInterface; the simulator to schedule oncolor- Color; the display color of the detector- Throws:
NamingException- in case of registration failure of the animationRemoteException- in case of remote registration failure of the animation
-
-
Method Details
-
getText
- Returns:
- text.
-
paint
- Overrides:
paintin classAbstractLineAnimation<LaneDetector>
-
destroy
- Specified by:
destroyin interfacenl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<LaneDetector>- Overrides:
destroyin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<LaneDetector>
-
toString
- Overrides:
toStringin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<LaneDetector>
-