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:
Serializable
,Renderable2DInterface<LaneAnimation.CenterLine>
,ClonableRenderable2DInterface<LaneAnimation.CenterLine>
- Enclosing class:
- LaneAnimation
public static class LaneAnimation.CenterLineAnimation extends Renderable2D<LaneAnimation.CenterLine> implements ClonableRenderable2DInterface<LaneAnimation.CenterLine>, Serializable
Animation for center line of a lane.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CenterLineAnimation(LaneAnimation.CenterLine centerLine, org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator)
Construct a new CenterLineAnimation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClonableRenderable2DInterface<LaneAnimation.CenterLine>
clone(LaneAnimation.CenterLine newSource, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator)
Clone the animation object and register it for the new source on the new simulation.void
paint(Graphics2D graphics, ImageObserver observer)
-
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, destroy, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate, toString
-
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, destroy, getId, getSource, paintComponent
-
-
-
-
Constructor Detail
-
CenterLineAnimation
public CenterLineAnimation(LaneAnimation.CenterLine centerLine, org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator) throws NamingException, RemoteException
Construct a new CenterLineAnimation.- Parameters:
centerLine
- CemterLine; the center line of a lanesimulator
- OTSSimulatorInterface; the simulator- Throws:
NamingException
- when the name of this object is not uniqueRemoteException
- when communication with a remote process fails
-
-
Method Detail
-
clone
public final ClonableRenderable2DInterface<LaneAnimation.CenterLine> clone(LaneAnimation.CenterLine newSource, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator) throws NamingException, RemoteException
Description 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
- OTSSimulatorInterface; the simulator- Returns:
- the generated clone
- Throws:
NamingException
- when animation context cannot be created or retrievedRemoteException
- - when remote context cannot be found
-
paint
public final void paint(Graphics2D graphics, ImageObserver observer)
- Specified by:
paint
in classRenderable2D<LaneAnimation.CenterLine>
-
-