Class TogglePrototype

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<Boolean>, com.globalmentor.model.Valued<Boolean>, Enableable, InfoModel, LabelModel, Model, ValueModel<Boolean>, Prototype

public class TogglePrototype extends ValuePrototype<Boolean>
A boolean value prototype which allows toggling between two boolean states. By default this prototype uses a default value of Boolean.FALSE.
Author:
Garret Wilson
  • Constructor Details

    • TogglePrototype

      public TogglePrototype()
      Default constructor with a Boolean.FALSE default value.
    • TogglePrototype

      public TogglePrototype(Boolean defaultValue)
      Default value constructor.
      Parameters:
      defaultValue - The default value, which will not be validated.
    • TogglePrototype

      public TogglePrototype(String label)
      Label constructor with a Boolean.FALSE default value.
      Parameters:
      label - The text of the label, or null if there should be no label.
    • TogglePrototype

      public TogglePrototype(Boolean defaultValue, String label)
      Default value and label constructor.
      Parameters:
      defaultValue - The default value, which will not be validated.
      label - The text of the label, or null if there should be no label.
    • TogglePrototype

      public TogglePrototype(String label, URI icon)
      Label and icon constructor with a Boolean.FALSE default value.
      Parameters:
      label - The text of the label, or null if there should be no label.
      icon - The icon URI, which may be a resource URI, or null if there is no icon URI.
    • TogglePrototype

      public TogglePrototype(Boolean defaultValue, String label, URI icon)
      Default value, label, and icon constructor.
      Parameters:
      defaultValue - The default value, which will not be validated.
      label - The text of the label, or null if there should be no label.
      icon - The icon URI, which may be a resource URI, or null if there is no icon URI.