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:
- java.io.Serializable,- Renderable2DInterface<Lane>,- ClonableRenderable2DInterface<Lane>
 
 public class LaneAnimation extends Renderable2D<Lane> implements ClonableRenderable2DInterface<Lane>, java.io.Serializable 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.$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 SummaryNested 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.- 
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterfaceRenderable2DInterface.Util
 
- 
 - 
Constructor SummaryConstructors Constructor Description LaneAnimation(Lane lane, SimulatorInterface.TimeDoubleUnit simulator, java.awt.Color color)Animate a Lane.
 - 
Method SummaryAll 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()LaneAnimation.TextgetText()voidpaint(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer)java.lang.StringtoString()- 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2Dbind2Context, contains, equals, getSource, hashCode, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslate
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterfacecontains, getSource, paint
 
- 
 
- 
- 
- 
Constructor Detail- 
LaneAnimationpublic LaneAnimation(Lane lane, SimulatorInterface.TimeDoubleUnit simulator, java.awt.Color color) throws javax.naming.NamingException, java.rmi.RemoteException Animate a Lane.- Parameters:
- lane- Lane; the lane
- simulator- SimulatorInterface.TimeDoubleUnit; the simulator
- color- Color; Color of the lane.
- Throws:
- javax.naming.NamingException- in case of registration failure of the animation
- java.rmi.RemoteException- on communication failure
 
 
- 
 - 
Method Detail- 
getTextpublic final LaneAnimation.Text getText() - Returns:
- text.
 
 - 
paintpublic final void paint(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer)- Specified by:
- paintin class- Renderable2D<Lane>
 
 - 
destroypublic final void destroy() throws javax.naming.NamingException, java.rmi.RemoteException- Specified by:
- destroyin interface- Renderable2DInterface<Lane>
- Overrides:
- destroyin class- Renderable2D<Lane>
- Throws:
- javax.naming.NamingException
- java.rmi.RemoteException
 
 - 
clonepublic ClonableRenderable2DInterface<Lane> clone(Lane newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws javax.naming.NamingException, java.rmi.RemoteException Clone the animation object and register it for the new source on the new simulation.- Specified by:
- clonein interface- ClonableRenderable2DInterface<Lane>
- Parameters:
- newSource- T; the source
- newSimulator- SimulatorInterface.TimeDoubleUnit; the simulator
- Returns:
- the generated clone
- Throws:
- javax.naming.NamingException- when animation context cannot be created or retrieved
- java.rmi.RemoteException- - when remote context cannot be found
 
 - 
toStringpublic final java.lang.String toString() - Overrides:
- toStringin class- Renderable2D<Lane>
 
 
- 
 
-