Interface Control.Builder

All Known Subinterfaces:
Controls.Builder, ToggleControl.Builder
Enclosing interface:
Control

public static interface Control.Builder
A builder for Control
  • Method Details

    • name

      Control.Builder name(String name)
      Parameters:
      name - the name of the control
      Returns:
      this Builder instance
    • enabled

      Control.Builder enabled(StateObserver enabled)
      Parameters:
      enabled - the state observer which controls the enabled state of the control
      Returns:
      this Builder instance
    • mnemonic

      Control.Builder mnemonic(char mnemonic)
      Parameters:
      mnemonic - the control mnemonic
      Returns:
      this Builder instance
    • smallIcon

      Control.Builder smallIcon(Icon smallIcon)
      Parameters:
      smallIcon - the small control icon
      Returns:
      this Builder instance
    • largeIcon

      Control.Builder largeIcon(Icon largeIcon)
      Parameters:
      largeIcon - the large control icon
      Returns:
      this Builder instance
    • description

      Control.Builder description(String description)
      Parameters:
      description - a string describing the control
      Returns:
      this Builder instance
    • keyStroke

      Control.Builder keyStroke(KeyStroke keyStroke)
      Parameters:
      keyStroke - the keystroke to associate with the control
      Returns:
      this Builder instance
    • build

      Control build()
      Returns:
      a new Control instance
      Throws:
      IllegalStateException - in case no command has been set