package nl.tudelft.simulation.examples.dsol.animation; import java.rmi.RemoteException; import org.djutils.draw.bounds.Bounds2d; import org.pmw.tinylog.Level; import nl.tudelft.simulation.dsol.animation.D2.RenderableScale; import nl.tudelft.simulation.dsol.experiment.ReplicationInterface; import nl.tudelft.simulation.dsol.experiment.SingleReplication; import nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator; import nl.tudelft.simulation.dsol.swing.gui.ConsoleLogger; import nl.tudelft.simulation.dsol.swing.gui.ConsoleOutput; import nl.tudelft.simulation.dsol.swing.gui.DSOLPanel; import nl.tudelft.simulation.dsol.swing.gui.animation.DSOLAnimationApplication; import nl.tudelft.simulation.dsol.swing.gui.animation.DSOLAnimationTab; import nl.tudelft.simulation.dsol.swing.gui.animation.panel.SearchPanel.ObjectKind; import nl.tudelft.simulation.dsol.swing.gui.control.RealTimeControlPanel; import nl.tudelft.simulation.language.DSOLException; /** *
* Copyright (c) 2002-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information https://simulation.tudelft.nl. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * * https://simulation.tudelft.nl/dsol/3.0/license.html. *
* @author Alexander Verbraeck */ public class BallSwingApplication extends DSOLAnimationApplication { /** */ private static final long serialVersionUID = 1L; /** * @param title String; the title * @param panel DSOLPanel; the panel * @throws DSOLException when simulator is not an animator * @throws IllegalArgumentException for illegal bounds * @throws RemoteException on network error */ public BallSwingApplication(final String title, final DSOLPanel panel) throws RemoteException, IllegalArgumentException, DSOLException { super(panel, title, DSOLAnimationTab.createAutoPanTab(new Bounds2d(-100, 100, -100, 100), panel.getSimulator())); getAnimationTab().getAnimationPanel().setRenderableScale(new RenderableScale(2.0, 0.5)); ObjectKind