floodsim.view.component

Members list

Type members

Classlikes

class CellTypeSelector(using imageCache: ImageCache[CellType]) extends UIComponent[JPanel]

A UI component to select a CellType using clickable icons.

A UI component to select a CellType using clickable icons.

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class FloodPercentageDisplay extends UIComponent[JPanel]

Displays the current flooded area percentage as a centered label.

Displays the current flooded area percentage as a centered label.

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class SimulationControls extends UIComponent[JPanel]

Vertical control panel for simulation actions and status. Provides:

Vertical control panel for simulation actions and status. Provides:

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class SimulationTimer extends UIComponent[JPanel]

Displays the simulation elapsed time in mm:ss format.

Displays the simulation elapsed time in mm:ss format.

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class SpeedToggleButton extends UIComponent[JButton]

Button that cycles through predefined simulation speeds with each click.

Button that cycles through predefined simulation speeds with each click.

  • The button label is updated to reflect the current speed.
  • Registered listeners are notified on every change. Usage:
  • Call onSpeedChange to subscribe.
  • Retrieve the Swing component via component.

Attributes

Supertypes
trait UIComponent[JButton]
class Object
trait Matchable
class Any
class StyledSlider(labelText: String, min: Int, max: Int, initial: Int) extends UIComponent[JPanel]

A labeled slider with tick spacing. Tick spacing:

A labeled slider with tick spacing. Tick spacing:

  • Major tick spacing is computed from the range size to keep labels readable.
  • Minor tick spacing is major/5 (may be zero for small ranges). API:
  • value to read the current slider value.
  • onValueChanged to register a handler fired when the user releases the knob or stops adjusting.

Value parameters

initial

initial slider value

labelText

label shown above the slider

max

slider maximum value

min

slider minimum value

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
trait UIComponent[A <: JComponent]

Small facade over Swing components to provide a typed component accessor and helper builders with a consistent application theme.

Small facade over Swing components to provide a typed component accessor and helper builders with a consistent application theme.

Type parameters

A

concrete Swing type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object UIComponent

Factory methods for styled Swing components.

Factory methods for styled Swing components.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class ViewGrid(gridSize: Int)(using imageCache: ImageCache[CellType], weatherImageCache: ImageCache[Weather]) extends UIComponent[JPanel]

Interactive grid view composed of ViewGridCell panels. Features:

Interactive grid view composed of ViewGridCell panels. Features:

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class ViewGridCell(cellRow: Int, cellCol: Int)(using imageCache: ImageCache[CellType], weatherImageCache: ImageCache[Weather]) extends UIComponent[JPanel]

A single grid cell view that renders:

A single grid cell view that renders:

  • a base tile image for the current floodsim.model.cell.CellType,
  • an optional semi-transparent color overlay,
  • an optional weather overlay image,
  • an optional text label with a dark backdrop for readability.

Value parameters

cellCol

the column index of this cell

cellRow

the row index of this cell

Attributes

Supertypes
trait UIComponent[JPanel]
class Object
trait Matchable
class Any
class WeatherToggleButton extends UIComponent[JToggleButton]

A styled toggle button to show/hide weather overlays or information.

A styled toggle button to show/hide weather overlays or information.

Attributes

Supertypes
trait UIComponent[JToggleButton]
class Object
trait Matchable
class Any