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 classClass for elevating the node for animation purposes.classText animation for the Node. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleEnsure 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 TypeMethodDescriptionvoiddestroy(Contextualized contextProvider) final voidpaint(Graphics2D graphics, ImageObserver observer) final StringtoString()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, setTranslateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
paintin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-
destroy
- Specified by:
destroyin interfacenl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<NodeAnimation.ElevatedNode>- Overrides:
destroyin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-
toString
- Overrides:
toStringin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<NodeAnimation.ElevatedNode>
-