Package org.opentrafficsim.draw.road
Class LaneAnimation
- java.lang.Object
-
- nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Lane>
-
- org.opentrafficsim.draw.road.LaneAnimation
-
- All Implemented Interfaces:
Serializable,Renderable2DInterface<Lane>,ClonableRenderable2DInterface<Lane>
public class LaneAnimation extends Renderable2D<Lane> implements ClonableRenderable2DInterface<Lane>, Serializable
Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.$LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, @version $Revision: 1401 $, by $Author: averbraeck $, initial version Oct 17, 2014
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLaneAnimation.CenterLineDraw center line of a lane.static classLaneAnimation.CenterLineAnimationAnimation for center line of a lane.classLaneAnimation.TextText animation for the Node.
-
Constructor Summary
Constructors Constructor Description LaneAnimation(Lane lane, SimulatorInterface.TimeDoubleUnit simulator, Color color)Animate a Lane.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClonableRenderable2DInterface<Lane>clone(Lane newSource, SimulatorInterface.TimeDoubleUnit newSimulator)Clone the animation object and register it for the new source on the new simulation.voiddestroy(SimulatorInterface<?,?,?> simulator)LaneAnimation.TextgetText()voidpaint(Graphics2D graphics, ImageObserver observer)StringtoString()-
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 Detail
-
LaneAnimation
public LaneAnimation(Lane lane, SimulatorInterface.TimeDoubleUnit simulator, Color color) throws NamingException, RemoteException
Animate a Lane.- Parameters:
lane- Lane; the lanesimulator- SimulatorInterface.TimeDoubleUnit; the simulatorcolor- Color; Color of the lane.- Throws:
NamingException- in case of registration failure of the animationRemoteException- on communication failure
-
-
Method Detail
-
getText
public final LaneAnimation.Text getText()
- Returns:
- text.
-
paint
public final void paint(Graphics2D graphics, ImageObserver observer)
- Specified by:
paintin classRenderable2D<Lane>
-
destroy
public final void destroy(SimulatorInterface<?,?,?> simulator)
- Specified by:
destroyin interfaceRenderable2DInterface<Lane>- Overrides:
destroyin classRenderable2D<Lane>
-
clone
public ClonableRenderable2DInterface<Lane> clone(Lane newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws NamingException, RemoteException
Clone the animation object and register it for the new source on the new simulation.- Specified by:
clonein interfaceClonableRenderable2DInterface<Lane>- Parameters:
newSource- T; the sourcenewSimulator- SimulatorInterface.TimeDoubleUnit; the simulator- Returns:
- the generated clone
- Throws:
NamingException- when animation context cannot be created or retrievedRemoteException- - when remote context cannot be found
-
toString
public final String toString()
- Overrides:
toStringin classRenderable2D<Lane>
-
-