Package org.opentrafficsim.draw.network
Class NodeAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
org.opentrafficsim.draw.network.NodeAnimation
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<NodeAnimation.ElevatedNode>
public class NodeAnimation
extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
implements nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<NodeAnimation.ElevatedNode>, Serializable
Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class for elevating the node for animation purposes.class
Text animation for the Node. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Ensure that node animations are slightly above lane surface. -
Constructor Summary
ConstructorsConstructorDescriptionNodeAnimation
(org.opentrafficsim.core.network.Node node, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy
(Contextualized contextProvider) final void
paint
(Graphics2D graphics, ImageObserver observer) final String
toString()
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate
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, getId, getSource, paintComponent
-
Field Details
-
ZOFFSET
public static final double ZOFFSETEnsure that node animations are slightly above lane surface.- See Also:
-
-
Constructor Details
-
NodeAnimation
public NodeAnimation(org.opentrafficsim.core.network.Node node, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator) throws NamingException, RemoteException - Parameters:
node
- Node; nsimulator
- OtsSimulatorInterface; s- Throws:
NamingException
- when animation context cannot be found.RemoteException
- on communication failure
-
-
Method Details
-
paint
- Specified by:
paint
in classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-
destroy
- Specified by:
destroy
in interfacenl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<NodeAnimation.ElevatedNode>
- Overrides:
destroy
in classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-
toString
- Overrides:
toString
in classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-