Class ImageBooleanSelectActionControl

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<Boolean>, com.globalmentor.model.Valued<Boolean>, ActionControl, ActionValueControl<Boolean>, Component, Control, ImageComponent, InputFocusableComponent, LabelDisplayableComponent, SelectActionControl, ValueControl<Boolean>, ValuedComponent<Boolean>, ActionListenable, ActionModel, Displayable, Enableable, ImageModel, InfoModel, LabelModel, Model, Selectable, PresentationModel, ValueModel<Boolean>, DepictedObject

public class ImageBooleanSelectActionControl extends AbstractBooleanSelectActionControl implements ImageComponent
Image control that can be selected and generates actions, storing a Boolean value in its model representing the selected state.
Author:
Garret Wilson
  • Field Details

    • ROLLOVER_IMAGE_URI_PROPERTY

      public static final String ROLLOVER_IMAGE_URI_PROPERTY
      The rollover image URI bound property.
    • SELECTED_IMAGE_URI_PROPERTY

      public static final String SELECTED_IMAGE_URI_PROPERTY
      The selected image URI bound property.
  • Constructor Details

    • ImageBooleanSelectActionControl

      public ImageBooleanSelectActionControl()
      Default constructor.
    • ImageBooleanSelectActionControl

      public ImageBooleanSelectActionControl(InfoModel infoModel, ImageModel imageModel, ActionModel actionModel, ValueModel<Boolean> valueModel, Enableable enableable)
      Info model, image model, action model, value model, and enableable object constructor.
      Parameters:
      infoModel - The component info model.
      imageModel - The component image model.
      actionModel - The component action model.
      valueModel - The component value model.
      enableable - The enableable object in which to store enabled status.
      Throws:
      NullPointerException - if the given info model, image model, action model, and/or enableable object is null.
    • ImageBooleanSelectActionControl

      public ImageBooleanSelectActionControl(ValuePrototype<Boolean> valuePrototype)
      Prototype constructor.
      Parameters:
      valuePrototype - The prototype on which this component should be based.
  • Method Details

    • getImageModel

      protected ImageModel getImageModel()
      Returns:
      The image model used by this component.
    • getImageURI

      public URI getImageURI()
      Specified by:
      getImageURI in interface ImageModel
      Returns:
      The image URI, which may be a resource URI, or null if there is no image URI.
    • setImageURI

      public void setImageURI(URI newImageURI)
      Description copied from interface: ImageModel
      Sets the URI of the image. This is a bound property.
      Specified by:
      setImageURI in interface ImageModel
      Parameters:
      newImageURI - The new URI of the image, which may be a resource URI.
      See Also:
    • getRolloverImageURI

      public URI getRolloverImageURI()
      Returns:
      The rollover image URI, which may be a resource URI, or null if there is no rollover image URI.
    • setRolloverImageURI

      public void setRolloverImageURI(URI newRolloverImageURI)
      Sets the URI of the rollover image. This is a bound property of type URI.
      Parameters:
      newRolloverImageURI - The new URI of the rollover image, which may be a resource URI.
      See Also:
    • getSelectedImageURI

      public URI getSelectedImageURI()
      Returns:
      The selected image URI, which may be a resource URI, or null if there is no selected image URI.
    • setSelectedImageURI

      public void setSelectedImageURI(URI newSelectedImageURI)
      Sets the URI of the selected image. This is a bound property of type URI.
      Parameters:
      newSelectedImageURI - The new URI of the selected image, which may be a resource URI.
      See Also: