Class TogglePrototype

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

    public class TogglePrototype
    extends ValuePrototype<java.lang.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 Detail

      • TogglePrototype

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

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

        public TogglePrototype​(java.lang.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​(java.lang.Boolean defaultValue,
                               java.lang.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​(java.lang.String label,
                               java.net.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​(java.lang.Boolean defaultValue,
                               java.lang.String label,
                               java.net.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.