Interface SelectActionControl

All Superinterfaces:
ActionControl, ActionListenable, ActionModel, Component, Control, DepictedObject, Displayable, Enableable, InfoModel, InputFocusableComponent, LabelModel, Model, PresentationModel, com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Selectable
All Known Subinterfaces:
SelectButtonControl, SelectLinkControl
All Known Implementing Classes:
AbstractBooleanSelectActionControl, AbstractSelectActionControl, AbstractSelectActionValueControl, BooleanSelectButton, BooleanSelectLink, BooleanSelectToolButton, ImageBooleanSelectActionControl, SelectButton, SelectLink, TaskStateSelectLink, ValueSelectButton, ValueSelectLink

public interface SelectActionControl extends ActionControl, Selectable
An action control that keeps track of its selected state. If the control is set to be toggled, when the action is initiated the selected state alternates between true and false. Otherwise, an action sets the selected state to true. The control defaults to auto-select mode. If this mode is turned off, no selection or toggling occurs automatically when the action occurs.
Author:
Garret Wilson
  • Field Details

    • AUTO_SELECT_PROPERTY

      static final String AUTO_SELECT_PROPERTY
      The auto-select bound property.
    • SELECTED_GLYPH_URI_PROPERTY

      static final String SELECTED_GLYPH_URI_PROPERTY
      The selected icon bound property.
    • TOGGLE_PROPERTY

      static final String TOGGLE_PROPERTY
      The toggle bound property.
    • UNSELECTED_GLYPH_URI_PROPERTY

      static final String UNSELECTED_GLYPH_URI_PROPERTY
      The unselected icon bound property.
  • Method Details

    • isAutoSelect

      boolean isAutoSelect()
      Returns:
      Whether this control automatically sets or toggles the selection state when the action occurs.
    • setAutoSelect

      void setAutoSelect(boolean newAutoSelect)
      Sets whether this control automatically sets or toggles the selection state when the action occurs. This is a bound property of type Boolean.
      Parameters:
      newAutoSelect - true if the control should automatically set or toggle the selection state when an action occurs.
      See Also:
    • getSelectedGlyphURI

      URI getSelectedGlyphURI()
      Returns:
      The selected icon URI, which may be a resource URI, or null if there is no selected icon URI.
    • setSelectedGlyphURI

      void setSelectedGlyphURI(URI newSelectedIcon)
      Sets the URI of the selected icon. This is a bound property of type URI.
      Parameters:
      newSelectedIcon - The new URI of the selected icon, which may be a resource URI.
      See Also:
    • isToggle

      boolean isToggle()
      Returns:
      Whether this control acts as a toggle, switching its value between true and false, or whether the action always sets the value to true.
    • setToggle

      void setToggle(boolean newToggle)
      Sets whether this control acts as a toggle, switching its value between true and false, or whether the action always sets the value to true. This is a bound property of type Boolean.
      Parameters:
      newToggle - true if the component should act as a toggle, else false if the action should unconditionally set the value to true.
      See Also:
    • getUnselectedGlyphURI

      URI getUnselectedGlyphURI()
      Returns:
      The unselected icon URI, which may be a resource URI, or null if there is no unselected icon URI.
    • setUnselectedGlyphURI

      void setUnselectedGlyphURI(URI newUnselectedIcon)
      Sets the URI of the unselected icon. This is a bound property of type URI.
      Parameters:
      newUnselectedIcon - The new URI of the unselected icon, which may be a resource URI.
      See Also: