Package org.opentrafficsim.draw.network
Class LinkAnimation
- java.lang.Object
 - 
- nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Link>
 - 
- org.opentrafficsim.draw.network.LinkAnimation
 
 
 
- 
- All Implemented Interfaces:
 Serializable,Renderable2DInterface<Link>,ClonableRenderable2DInterface<Link>
public class LinkAnimation extends Renderable2D<Link> implements ClonableRenderable2DInterface<Link>, Serializable
Draws a Link.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: 2018-10-11 22:54:04 +0200 (Thu, 11 Oct 2018) $, @version $Revision: 4696 $, by $Author: averbraeck $, initial version Sep 13, 2014
- Author:
 - Alexander Verbraeck
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description classLinkAnimation.TextText animation for the Link.- 
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
Renderable2DInterface.Util 
 - 
 
- 
Constructor Summary
Constructors Constructor Description LinkAnimation(Link link, SimulatorInterface.TimeDoubleUnit simulator, float width) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClonableRenderable2DInterface<Link>clone(Link newSource, SimulatorInterface.TimeDoubleUnit newSimulator)Clone the animation object and register it for the new source on the new simulation.voiddestroy()voidpaint(Graphics2D graphics, ImageObserver observer)StringtoString()- 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, 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, getSource, paint 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
LinkAnimation
public LinkAnimation(Link link, SimulatorInterface.TimeDoubleUnit simulator, float width) throws NamingException, RemoteException
- Parameters:
 link- Link; Linksimulator- SimulatorInterface.TimeDoubleUnit; simulatorwidth- float; width- Throws:
 NamingException- for problems with registering in contextRemoteException- on communication failure
 
 - 
 
- 
Method Detail
- 
paint
public final void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
- Specified by:
 paintin classRenderable2D<Link>- Throws:
 RemoteException
 
- 
destroy
public final void destroy() throws NamingException, RemoteException- Specified by:
 destroyin interfaceRenderable2DInterface<Link>- Overrides:
 destroyin classRenderable2D<Link>- Throws:
 NamingExceptionRemoteException
 
- 
clone
public ClonableRenderable2DInterface<Link> clone(Link 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<Link>- 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<Link>
 
 - 
 
 -