public abstract class OTSWebServer extends Object implements nl.tudelft.simulation.event.EventListenerInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
OTSWebServer.XHRHandler
Answer handles the events from the web-based user interface.
|
| Constructor and Description |
|---|
OTSWebServer(String title,
OTSSimulatorInterface simulator,
Rectangle2D.Double extent) |
| Modifier and Type | Method and Description |
|---|---|
HTMLAnimationPanel |
getAnimationPanel() |
OTSSimulatorInterface |
getSimulator() |
String |
getTitle() |
void |
notify(nl.tudelft.simulation.event.EventInterface event) |
protected void |
setSpeedFactor(double speedFactor) |
protected boolean |
startSimulator()
Try to start the simulator, and return whether the simulator has been started.
|
protected boolean |
stopSimulator()
Try to stop the simulator, and return whether the simulator has been stopped.
|
public OTSWebServer(String title, OTSSimulatorInterface simulator, Rectangle2D.Double extent) throws Exception
title - String; the title for the model windowsimulator - SimulatorInterface<?,?,?>; the simulatorextent - Rectangle2D.Double; the extent to use for the graphics (min/max coordinates)Exception - in case jetty crashespublic final String getTitle()
public final OTSSimulatorInterface getSimulator()
public final HTMLAnimationPanel getAnimationPanel()
protected boolean startSimulator()
protected boolean stopSimulator()
protected void setSpeedFactor(double speedFactor)
speedFactor - double; the new speed factorpublic void notify(nl.tudelft.simulation.event.EventInterface event)
throws RemoteException
notify in interface nl.tudelft.simulation.event.EventListenerInterfaceRemoteExceptionCopyright © 2014–2019 Delft University of Technology. All rights reserved.