Class OTSWebServer

    • Constructor Detail

      • OTSWebServer

        public OTSWebServer​(String title,
                            OTSSimulatorInterface simulator,
                            Rectangle2D.Double extent)
                     throws Exception
        Parameters:
        title - String; the title for the model window
        simulator - SimulatorInterface<?,?,?>; the simulator
        extent - Rectangle2D.Double; the extent to use for the graphics (min/max coordinates)
        Throws:
        Exception - in case jetty crashes
    • Method Detail

      • getTitle

        public final String getTitle()
        Returns:
        title
      • getAnimationPanel

        public final HTMLAnimationPanel getAnimationPanel()
        Returns:
        animationPanel
      • startSimulator

        protected boolean startSimulator()
        Try to start the simulator, and return whether the simulator has been started.
        Returns:
        whether the simulator has been started or not
      • stopSimulator

        protected boolean stopSimulator()
        Try to stop the simulator, and return whether the simulator has been stopped.
        Returns:
        whether the simulator has been stopped or not
      • setSpeedFactor

        protected void setSpeedFactor​(double speedFactor)
        Parameters:
        speedFactor - double; the new speed factor