Class OTSSimulationPanel

    • Constructor Detail

      • 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 Detail

      • addConsoleTab

        public final void addConsoleTab()
        Adds the console tab.
      • 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 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.