JSGUI

trait JSGUI

Interface that describes the user interface for the simulation (JS).

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def config(): Task[FilePath]

This task allows the caller to obtain the path of the configuration file for the simulation. Useful for it.unibo.pps.boundary.BoundaryModule.ConfigBoundary.config.

This task allows the caller to obtain the path of the configuration file for the simulation. Useful for it.unibo.pps.boundary.BoundaryModule.ConfigBoundary.config.

Returns:

the task

def error(errors: Seq[ConfigurationError]): Task[Unit]

This task allows the caller to show an error in the configuration. Useful for it.unibo.pps.boundary.BoundaryModule.ConfigBoundary.error.

This task allows the caller to show an error in the configuration. Useful for it.unibo.pps.boundary.BoundaryModule.ConfigBoundary.error.

Value parameters:
errors

the errors in the configuration

Returns:

the task

def events(): Observable[Event]

Obtain the observable that emits all the events of the user interface.

Obtain the observable that emits all the events of the user interface.

Returns:

the observable

def init(): Task[Unit]

Initialize the gui.

Initialize the gui.

Returns:

the task

def render(env: Environment): Task[Unit]

Render the new state of the simulation on the user interface.

Render the new state of the simulation on the user interface.

Value parameters:
env

the environment to render

Returns:

the task

def start(): Task[Unit]

Handle the start of the simulation.

Handle the start of the simulation.

Returns:

the task

def stop(): Task[Unit]

The simulation has stopped, so the gui must handle the termination.

The simulation has stopped, so the gui must handle the termination.

Returns:

the task