Class OtsSimulationPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
OtsAnimationPanel

public class OtsSimulationPanel extends JPanel
GUI with simulator, console, control panel, status bar, etc.

Copyright (c) 2013-2024 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
See Also:
  • Constructor Details

    • OtsSimulationPanel

      public OtsSimulationPanel(org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, org.opentrafficsim.core.dsol.OtsModelInterface otsModel) throws RemoteException
      Construct a panel that looks like the DSOLPanel for quick building of OTS applications.
      Parameters:
      simulator - OtsSimulatorInterface; the simulator or animator of the model.
      otsModel - OtsModelInterface; the model with its properties.
      Throws:
      RemoteException - when communications to a remote machine fails
  • Method Details

    • addConsoleTab

      public final void addConsoleTab()
      Adds the console tab.
    • addPropertiesTab

      public final void addPropertiesTab() throws nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException
      Adds the properties tab.
      Throws:
      nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException - on exception with properties
    • getTabbedPane

      public final nl.tudelft.simulation.dsol.swing.gui.TabbedContentPane getTabbedPane()
      Returns:
      tabbedPane
    • getSimulator

      public final org.opentrafficsim.core.dsol.OtsSimulatorInterface getSimulator()
      Returns:
      simulator.
    • getOtsControlPanel

      public final OtsControlPanel getOtsControlPanel()
      Return the OtsControlPanel of this OtsSimulationPanel.
      Returns:
      OtsControlPanel; the OTS control panel
    • getConsole

      public final nl.tudelft.simulation.dsol.swing.gui.ConsoleOutput getConsole()
      Returns:
      console
    • getOtsModel

      public final org.opentrafficsim.core.dsol.OtsModelInterface getOtsModel()
      Returns:
      otsModel
    • enableSimulationControlButtons

      public void enableSimulationControlButtons()
      Enable the simulation or animation buttons in the GUI. This method HAS TO BE CALLED in order for the buttons to be enabled, because the initial state is DISABLED. Typically, this is done after all tabs, statistics, and other user interface and model components have been constructed and initialized.
    • disableSimulationControlButtons

      public void disableSimulationControlButtons()
      Disable the simulation or animation buttons in the GUI.
    • toString

      public final String toString()
      Overrides:
      toString in class Component