Package org.opentrafficsim.draw.network
Class LinkAnimation.Text
java.lang.Object
org.opentrafficsim.draw.TextAnimation<LinkAnimation.LinkData,LinkAnimation.Text>
org.opentrafficsim.draw.network.LinkAnimation.Text
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.dsol.animation.Locatable
,org.opentrafficsim.base.geometry.OtsLocatable
,org.opentrafficsim.base.geometry.SpatialObject
- Enclosing class:
- LinkAnimation
Text animation for the Link. Separate class to be able to turn it on and off...
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, Peter Knoppers, Wouter Schakel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opentrafficsim.draw.TextAnimation
TextAnimation.ContrastToBackground, TextAnimation.ScaleDependentRendering
-
Field Summary
Fields inherited from class org.opentrafficsim.draw.TextAnimation
RENDERALWAYS, RENDERWHEN1, RENDERWHEN10, RENDERWHEN100
-
Constructor Summary
ConstructorsConstructorDescriptionText
(LinkAnimation.LinkData source, Supplier<String> text, float dx, float dy, TextAlignment textPlacement, Color color, nl.tudelft.simulation.naming.context.Contextualized contextualized, TextAnimation.ScaleDependentRendering scaleDependentRendering) -
Method Summary
Methods inherited from class org.opentrafficsim.draw.TextAnimation
destroy, getBounds, getColor, getContour, getDx, getDy, getFont, getFontSize, getLocation, getScaleDependentRendering, getSource, getText, getTextAlignment, getZ, isFlip, isRotate, isScale, isTranslate, paint, setColor, setDynamic, setFlip, setRotate, setScale, setText, setTranslate, setXY
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.Locatable
getDirZ
Methods inherited from interface org.opentrafficsim.base.geometry.OtsLocatable
getShape
-
Constructor Details
-
Text
public Text(LinkAnimation.LinkData source, Supplier<String> text, float dx, float dy, TextAlignment textPlacement, Color color, nl.tudelft.simulation.naming.context.Contextualized contextualized, TextAnimation.ScaleDependentRendering scaleDependentRendering) - Parameters:
source
- the object for which the text is displayedtext
- the text to displaydx
- the horizontal movement of the text, in metersdy
- the vertical movement of the text, in meterstextPlacement
- where to place the textcolor
- the color of the textcontextualized
- context provider.scaleDependentRendering
- enables rendering in a scale dependent fashion
-
-
Method Details