package nl.tudelft.simulation.examples.dsol.dess; import java.rmi.RemoteException; import nl.tudelft.simulation.dsol.simulators.DESSSimulatorInterface; import nl.tudelft.simulation.dsol.statistics.table.PersistentTableModel; import nl.tudelft.simulation.dsol.swing.gui.DSOLPanel; import nl.tudelft.simulation.dsol.swing.gui.TablePanel; import nl.tudelft.simulation.dsol.swing.gui.control.GenericControlPanel; import nl.tudelft.simulation.dsol.swing.statistics.StatisticsTable; /** *

* Copyright (c) 2002-2022 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 DESSPanel extends DSOLPanel { /** */ private static final long serialVersionUID = 1L; /** * @param model DESSModel; the model * @param simulator DESSSimulatorInterface.TimeDouble; the simulator * @throws RemoteException on error */ public DESSPanel(final DESSModel model, final DESSSimulatorInterface.TimeDouble simulator) throws RemoteException { super(new GenericControlPanel<>(model, simulator)); // add a chart for the demo. TablePanel charts = new TablePanel(2, 1); getTabbedPane().addTab("statistics", charts); getTabbedPane().setSelectedIndex(0); charts.setCell(model.getDistanceChart().getSwingPanel(), 0, 0); StatisticsTable distanceTable = new StatisticsTable(new PersistentTableModel(model.getDistancePersistent())); charts.setCell(distanceTable.getSwingPanel(), 1, 0); } }