SpeedToggleButton

floodsim.view.component.SpeedToggleButton
class SpeedToggleButton extends UIComponent[JButton]

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

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

Members list

Value members

Concrete methods

def component: JButton

Returns the underlying Swing component.

Returns the underlying Swing component.

Attributes

Registers a listener to be notified when the simulation speed changes.

Registers a listener to be notified when the simulation speed changes.

Value parameters

action

function to be called with the new SimulationSpeed

Attributes

Returns

this SpeedToggleButton instance for chaining