Package org.opentrafficsim.draw.road
Class LaneAnimation.CenterLineAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<LaneAnimation.CenterLine>
org.opentrafficsim.draw.road.LaneAnimation.CenterLineAnimation
- All Implemented Interfaces:
java.io.Serializable
,Renderable2DInterface<LaneAnimation.CenterLine>
,ClonableRenderable2DInterface<LaneAnimation.CenterLine>
- Enclosing class:
- LaneAnimation
public static class LaneAnimation.CenterLineAnimation extends Renderable2D<LaneAnimation.CenterLine> implements ClonableRenderable2DInterface<LaneAnimation.CenterLine>, java.io.Serializable
Animation for center line of a lane.
- 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 CenterLineAnimation(LaneAnimation.CenterLine centerLine, SimulatorInterface.TimeDoubleUnit simulator)
Construct a new CenterLineAnimation. -
Method Summary
Modifier and Type Method Description ClonableRenderable2DInterface<LaneAnimation.CenterLine>
clone(LaneAnimation.CenterLine newSource, SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the animation object and register it for the new source on the new simulation.void
paint(java.awt.Graphics2D graphics, java.awt.image.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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
contains, destroy, getSource, paint
-
Constructor Details
-
CenterLineAnimation
public CenterLineAnimation(LaneAnimation.CenterLine centerLine, SimulatorInterface.TimeDoubleUnit simulator) throws javax.naming.NamingException, java.rmi.RemoteExceptionConstruct a new CenterLineAnimation.- Parameters:
centerLine
- CemterLine; the center line of a lanesimulator
- SimulatorInterface.TimeDoubleUnit; the simulator- Throws:
javax.naming.NamingException
- when the name of this object is not uniquejava.rmi.RemoteException
- when communication with a remote process fails
-
-
Method Details
-
clone
public final ClonableRenderable2DInterface<LaneAnimation.CenterLine> clone(LaneAnimation.CenterLine newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws javax.naming.NamingException, java.rmi.RemoteExceptionDescription copied from interface:ClonableRenderable2DInterface
Clone the animation object and register it for the new source on the new simulation.- Specified by:
clone
in interfaceClonableRenderable2DInterface<LaneAnimation.CenterLine>
- Parameters:
newSource
- T; the sourcenewSimulator
- SimulatorInterface.TimeDoubleUnit; the simulator- Returns:
- the generated clone
- Throws:
javax.naming.NamingException
- when animation context cannot be created or retrievedjava.rmi.RemoteException
- - when remote context cannot be found
-
paint
public final void paint(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer) throws java.rmi.RemoteException- Specified by:
paint
in classRenderable2D<LaneAnimation.CenterLine>
- Throws:
java.rmi.RemoteException
-