Class BusStopAnimation
java.lang.Object
nl.tudelft.simulation.dsol.animation.d2.Renderable2d<L>
org.opentrafficsim.animation.OtsRenderable<L>
org.opentrafficsim.animation.OtsRenderableLabeled<L,T>
org.opentrafficsim.animation.road.AbstractLineAnimation<BusStopAnimation.BusStopData,BusStopAnimation.Text>
org.opentrafficsim.animation.road.BusStopAnimation
- All Implemented Interfaces:
Renderable2dInterface<BusStopAnimation.BusStopData>
public class BusStopAnimation
extends AbstractLineAnimation<BusStopAnimation.BusStopData,BusStopAnimation.Text>
Draw bus stop.
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProvides the information required to draw a bus stop.static classText animation for the bus stop.Nested classes/interfaces inherited from class org.opentrafficsim.animation.road.AbstractLineAnimation
AbstractLineAnimation.LaneBasedObjectDataNested classes/interfaces inherited from class org.opentrafficsim.animation.OtsRenderableLabeled
OtsRenderableLabeled.NoText<L extends OtsShape> -
Field Summary
Fields inherited from interface nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface
ANIMATION_OBJECT_COUNTER, FLIP_FLAG, ROTATE_FLAG, SCALE_FLAG, SCALE_OBJECT_FLAG, SCALE_Y_FLAG, TRANSLATE_FLAG -
Constructor Summary
ConstructorsConstructorDescriptionBusStopAnimation(BusStopAnimation.BusStopData laneDetector, nl.tudelft.simulation.naming.context.Contextualized contextualized) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected BusStopAnimation.TextcreateText(BusStopAnimation.BusStopData source, nl.tudelft.simulation.naming.context.Contextualized contextualized, String prefix) Returns a text object that is co-animated with the object itself.voidpaint(Graphics2D graphics, ImageObserver observer) toString()Methods inherited from class org.opentrafficsim.animation.OtsRenderableLabeled
destroy, setDynamicMethods inherited from class org.opentrafficsim.animation.OtsRenderable
contains, contains, isDynamic, resetRendering, setRenderingMethods 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
-
Constructor Details
-
BusStopAnimation
public BusStopAnimation(BusStopAnimation.BusStopData laneDetector, nl.tudelft.simulation.naming.context.Contextualized contextualized) throws NamingException, RemoteException Constructor.- Parameters:
laneDetector- the lane detector to drawcontextualized- context provider- Throws:
NamingException- in case of registration failure of the animationRemoteException- in case of remote registration failure of the animation
-
-
Method Details
-
createText
protected BusStopAnimation.Text createText(BusStopAnimation.BusStopData source, nl.tudelft.simulation.naming.context.Contextualized contextualized, String prefix) Description copied from class:OtsRenderableLabeledReturns a text object that is co-animated with the object itself. Sub-classes ofOtsRenderableLabeledtypically define a.Textclass that extendsRenderableTextSourcesuch that a separate class exists that can be toggled on/off. In this way labels of renderables can be show separately from the object itself. Theprefixmay be ignore depending on the sub-class knowing it provided no prefix to this class, its super class.- Specified by:
createTextin classOtsRenderableLabeled<BusStopAnimation.BusStopData,BusStopAnimation.Text> - Parameters:
source- the object for which the text is displayedcontextualized- context providerprefix- prefix for the label- Returns:
- text renderable, may be
nullto omit a label
-
paint
- Overrides:
paintin classAbstractLineAnimation<BusStopAnimation.BusStopData,BusStopAnimation.Text>
-
toString
- Overrides:
toStringin classRenderable2d<BusStopAnimation.BusStopData>
-