Class HelperAnnotation
java.lang.Object
nl.tudelft.simulation.dsol.animation.d2.Renderable2d<L>
org.opentrafficsim.animation.OtsRenderable<L>
org.opentrafficsim.editor.extensions.map.edit.MapAnnotation<HelperAnnotation.Helper>
org.opentrafficsim.editor.extensions.map.edit.HelperAnnotation
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.d2.Renderable2dInterface<HelperAnnotation.Helper>
Annotations that helps provide context to a draggable annotation. For example snapping lines.
Copyright (c) 2026-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper annotation data.static enumScaling option. -
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
ConstructorsConstructorDescriptionHelperAnnotation(HelperAnnotation.Helper source, EditorMap map, HelperAnnotation.Scaling scale) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidpaint(Graphics2D graphics, ImageObserver observer) setPredicate(Supplier<Boolean> predicate) Set predicate.Methods inherited from class org.opentrafficsim.editor.extensions.map.edit.MapAnnotation
getMap, px, pxMethods inherited from class org.opentrafficsim.animation.OtsRenderable
contains, contains, isDynamic, resetRendering, setDynamic, setRenderingMethods inherited from class nl.tudelft.simulation.dsol.animation.d2.Renderable2d
bind2Context, contains, destroy, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate, toString
-
Constructor Details
-
HelperAnnotation
public HelperAnnotation(HelperAnnotation.Helper source, EditorMap map, HelperAnnotation.Scaling scale) Constructor.- Parameters:
source- sourcemap- mapscale- whether to scale this annotation
-
-
Method Details
-
setPredicate
Set predicate. If the predicate is false, the draggable is not painted.- Parameters:
predicate- predicate- Returns:
- this, for method chaining
-
paint
- Specified by:
paintin classnl.tudelft.simulation.dsol.animation.d2.Renderable2d<HelperAnnotation.Helper>
-