package nl.tudelft.simulation.dsol.swing.gui.animation; import nl.tudelft.simulation.dsol.animation.Locatable; /** * * Helper class to set the animation toggles for the animation panel. Code based on OpenTrafficSim project component with the same * purpose. *

* Copyright (c) 2020-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information DSOL Manual. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * DSOL License. *

* @author Alexander Verbraeck * @author Wouter Schakel */ public final class AnimationToggles { /** * Do not instantiate this class. */ private AnimationToggles() { // static class. } /** * Set a class to be shown in the animation to true. * @param panel DSOLAnimationPanel; the DSOLAnimationPanel where the animation of a class has to be switched off * @param locatableClass Class<? extends Locatable>; the class for which the animation has to be shown. */ public static void showAnimationClass(final DSOLAnimationTab panel, final Class locatableClass) { panel.getAnimationPanel().showClass(locatableClass); panel.updateAnimationClassCheckBox(locatableClass); } /** * Set a class to be shown in the animation to false. * @param panel DSOLAnimationPanel; the DSOLAnimationPanel where the animation of a class has to be switched off * @param locatableClass Class<? extends Locatable>; the class for which the animation has to be shown. */ public static void hideAnimationClass(final DSOLAnimationTab panel, final Class locatableClass) { panel.getAnimationPanel().hideClass(locatableClass); panel.updateAnimationClassCheckBox(locatableClass); } }