Package org.opentrafficsim.swing.gui
Interface OtsSimulationPanelDecorator
public interface OtsSimulationPanelDecorator
Decorator for the
OtsSimulationPanel. Default method implementations are provided which sub-classes may implement
with different decoration, e.g. additional tabs.
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:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionDefault GTU colorers.static final ImmutableMap<GtuType,Color> Standard drawing colors for GTU types.static final ImmutableMap<GtuType,DefaultCarAnimation.GtuData.GtuMarker> Standard markers for GTU types. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddTabs(OtsSimulationPanel simulationPanel, Network network) Adds tabs.default voidanimateSimulation(OtsSimulationPanel simulationPanel, Network network) Creates the animation objects.default voiddecorate(OtsSimulationPanel simulationPanel, Network network) Invokes all decoration methods.Return GTU colorers.Returns a map of markers to use on GTU types.default voidsetAnimationToggles(OtsSimulationPanel simulationPanel) Set simulation toggles.default voidsetupDemo(OtsSimulationPanel simulationPanel, Network network) Setup a demo panel within the simulation panel.
-
Field Details
-
DEFAULT_GTU_COLORERS
Default GTU colorers. -
GTU_TYPE_COLORS
Standard drawing colors for GTU types. -
GTU_TYPE_MARKERS
Standard markers for GTU types.
-
-
Method Details
-
decorate
Invokes all decoration methods.- Parameters:
simulationPanel- simulation panelnetwork- network
-
setAnimationToggles
Set simulation toggles. The default implementation sets standard icon toggles.- Parameters:
simulationPanel- simulation panel
-
animateSimulation
Creates the animation objects. This method is overridable. The default usesDefaultAnimationFactory.- Parameters:
simulationPanel- simulation panelnetwork- network
-
addTabs
Adds tabs. The default implementation does nothing.- Parameters:
simulationPanel- simulation panelnetwork- network
-
setupDemo
Setup a demo panel within the simulation panel. The default implementation does nothing.- Parameters:
simulationPanel- simulation panelnetwork- network
-
getGtuColorers
Return GTU colorers. The default implementation returns the default colorers.- Returns:
- GTU colorers
-
getGtuMarkers
Returns a map of markers to use on GTU types. The default implementation returns default markers (NL.TRUCK as square).- Returns:
- map of markers to use on GTU types
-