floodsim.view.panel
package floodsim.view.panel
Members list
Type members
Classlikes
class ParametersPanel(navigationController: NavigationController) extends UIComponent[JPanel]
Panel for configuring simulation parameters before starting a run. Provides sliders for:
Panel for configuring simulation parameters before starting a run. Provides sliders for:
- Grid size (cells per side)
- Weather expansion (%)
- Cell flooded threshold (%)
- Map flooded threshold (%) Actions:
- "Simulation": builds floodsim.model.state.SimulationParams from current values and navigates to the simulation view.
- "Back": returns to the welcome view.
Attributes
- Supertypes
class SimulationPanel(params: SimulationParams, navigationController: NavigationController)(using imageCache: ImageCache[CellType], weatherImageCache: ImageCache[Weather]) extends UIComponent[JPanel], SimulationListener
Main simulation view: hosts the interactive grid, controls, and reacts to controller updates. Composition:
Main simulation view: hosts the interactive grid, controls, and reacts to controller updates. Composition:
- floodsim.view.component.ViewGrid in the center shows cells with overlays and optional weather icons.
- Sidebar hosts floodsim.view.component.CellTypeSelector and floodsim.view.component.SimulationControls. Controller:
- Creates a floodsim.controller.SimulationController via floodsim.controller.ControllerFactory.
- Registers itself as a floodsim.controller.SimulationListener for state/timer updates. Image resources:
- Requires given floodsim.view.util.resource.ImageCache instances for floodsim.model.cell.CellType and floodsim.model.weather.Weather.
Attributes
- Supertypes
class WelcomePanel(navigationController: NavigationController) extends UIComponent[JPanel]
Initial welcome screen for the Flood Simulator. Provides:
Initial welcome screen for the Flood Simulator. Provides:
- Title label
- "Simulation" button to navigate to parameter configuration
- "Exit" button to quit the application
Attributes
- Supertypes
In this article