SimulationControls

floodsim.view.component.SimulationControls
class SimulationControls extends UIComponent[JPanel]

Vertical control panel for simulation actions and status. Provides:

Attributes

Graph
Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def component: JPanel

Returns the underlying Swing component.

Returns the underlying Swing component.

Attributes

def onGenerateMap(action: => Unit): SimulationControls

Sets the action to perform when the Generate Random Map button is clicked.

Sets the action to perform when the Generate Random Map button is clicked.

Value parameters

action

the action to execute

Attributes

Returns

this SimulationControls instance for method chaining

def onGenerateReport(action: => Unit): SimulationControls

Sets the action to perform when the Generate Report button is clicked.

Sets the action to perform when the Generate Report button is clicked.

Value parameters

action

the action to execute

Attributes

Returns

this SimulationControls instance for method chaining

def onPauseSimulation(action: => Unit): SimulationControls

Sets the action to perform when the Pause Simulation button is clicked.

Sets the action to perform when the Pause Simulation button is clicked.

Value parameters

action

the action to execute

Attributes

Returns

this SimulationControls instance for method chaining

Sets the action to perform when the simulation speed is changed.

Sets the action to perform when the simulation speed is changed.

Value parameters

action

the action to execute with the new speed

Attributes

Returns

this SimulationControls instance for method chaining

def onStartSimulation(action: => Unit): SimulationControls

Sets the action to perform when the Start Simulation button is clicked.

Sets the action to perform when the Start Simulation button is clicked.

Value parameters

action

the action to execute

Attributes

Returns

this SimulationControls instance for method chaining

def onStopSimulation(action: => Unit): SimulationControls

Sets the action to perform when the Stop Simulation button is clicked.

Sets the action to perform when the Stop Simulation button is clicked.

Value parameters

action

the action to execute

Attributes

Returns

this SimulationControls instance for method chaining

def onWeatherToggle(action: Boolean => Unit): SimulationControls

Sets the action to perform when the weather overlay is toggled.

Sets the action to perform when the weather overlay is toggled.

Value parameters

action

the action to execute with the new toggle state

Attributes

Returns

this SimulationControls instance for method chaining

Sets the controls to the completed state, enabling report generation.

Sets the controls to the completed state, enabling report generation.

Attributes

def updateFloodPercentage(percentage: Double): Unit

Updates the displayed flooded area percentage.

Updates the displayed flooded area percentage.

Value parameters

percentage

the new flooded percentage (0.0 to 100.0)

Attributes

def updateTimer(timer: Timer): Unit

Updates the displayed simulation timer.

Updates the displayed simulation timer.

Value parameters

timer

the new Timer value

Attributes