Package org.opentrafficsim.draw.network
Class LinkAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.d2.Renderable2d<L>
org.opentrafficsim.base.geometry.OtsRenderable<LinkAnimation.LinkData>
org.opentrafficsim.draw.network.LinkAnimation
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<LinkAnimation.LinkData>
public class LinkAnimation
extends org.opentrafficsim.base.geometry.OtsRenderable<LinkAnimation.LinkData>
Draws LinkData.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Wouter Schakel
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
LinkData provides the information required to draw a link.class
Text animation for the Link. -
Field Summary
Fields inherited from class org.opentrafficsim.base.geometry.OtsRenderable
RENDERING_KEYS, RENDERING_VALUES
-
Constructor Summary
ConstructorDescriptionLinkAnimation
(LinkAnimation.LinkData link, nl.tudelft.simulation.naming.context.Contextualized contextualized, float width) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy
(nl.tudelft.simulation.naming.context.Contextualized contextProvider) final void
paint
(Graphics2D graphics, ImageObserver observer) setDynamic
(boolean dynamic) Sets the animation as dynamic, obtaining geometry at each draw.final String
toString()
Methods inherited from class org.opentrafficsim.base.geometry.OtsRenderable
contains, resetRendering, setRendering, toBoundsTransform
Methods inherited from class nl.tudelft.simulation.dsol.animation.d2.Renderable2d
bind2Context, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate
-
Constructor Details
-
LinkAnimation
public LinkAnimation(LinkAnimation.LinkData link, nl.tudelft.simulation.naming.context.Contextualized contextualized, float width) throws NamingException, RemoteException - Parameters:
link
- LinkData; link data.contextualized
- Contextualized; context provider.width
- float; width- Throws:
NamingException
- for problems with registering in contextRemoteException
- on communication failure
-
-
Method Details
-
setDynamic
Sets the animation as dynamic, obtaining geometry at each draw.- Parameters:
dynamic
- boolean; whether it is dynamicfalse
by default.- Returns:
- LinkAnimation; for method chaining.
-
paint
- Specified by:
paint
in classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>
-
destroy
public void destroy(nl.tudelft.simulation.naming.context.Contextualized contextProvider) - Specified by:
destroy
in interfacenl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<LinkAnimation.LinkData>
- Overrides:
destroy
in classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>
-
toString
- Overrides:
toString
in classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<LinkAnimation.LinkData>
-