Package org.opentrafficsim.draw.road
Class StripeAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Stripe>
org.opentrafficsim.draw.road.StripeAnimation
- All Implemented Interfaces:
java.io.Serializable
,Renderable2DInterface<Stripe>
,ClonableRenderable2DInterface<Stripe>
public class StripeAnimation extends Renderable2D<Stripe> implements ClonableRenderable2DInterface<Stripe>, java.io.Serializable
Draw road stripes.
Copyright (c) 2013-2019 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 class
StripeAnimation.TYPE
Stripe type.Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
Renderable2DInterface.Util
-
Constructor Summary
Constructors Constructor Description StripeAnimation(Stripe source, SimulatorInterface.TimeDoubleUnit simulator, StripeAnimation.TYPE type)
-
Method Summary
Modifier and Type Method Description ClonableRenderable2DInterface<Stripe>
clone(Stripe 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)
java.lang.String
toString()
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
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
-
StripeAnimation
public StripeAnimation(Stripe source, SimulatorInterface.TimeDoubleUnit simulator, StripeAnimation.TYPE type) throws javax.naming.NamingException, java.rmi.RemoteException, OTSGeometryException- Parameters:
source
- Stripe; ssimulator
- SimulatorInterface.TimeDoubleUnit; stype
- TYPE; t- Throws:
javax.naming.NamingException
- nejava.rmi.RemoteException
- on communication failureOTSGeometryException
- when something is very wrong with the geometry of the line
-
-
Method Details
-
paint
public final void paint(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer)- Specified by:
paint
in classRenderable2D<Stripe>
-
clone
public ClonableRenderable2DInterface<Stripe> clone(Stripe newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws javax.naming.NamingException, java.rmi.RemoteExceptionClone the animation object and register it for the new source on the new simulation.- Specified by:
clone
in interfaceClonableRenderable2DInterface<Stripe>
- 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
-
toString
public final java.lang.String toString()- Overrides:
toString
in classRenderable2D<Stripe>
-