Class AbstractSelectActionControl

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, ActionControl, Component, Control, InputFocusableComponent, LabelDisplayableComponent, SelectActionControl, ActionListenable, ActionModel, Displayable, Enableable, InfoModel, LabelModel, Model, Selectable, PresentationModel, DepictedObject
Direct Known Subclasses:
SelectButton, SelectLink

public abstract class AbstractSelectActionControl extends AbstractActionControl implements SelectActionControl
Abstract selectable action control.
Author:
Garret Wilson
  • Constructor Details

    • AbstractSelectActionControl

      public AbstractSelectActionControl(InfoModel infoModel, ActionModel actionModel, Enableable enableable)
      Info model, action model, and enableable object constructor.
      Parameters:
      infoModel - The component info model.
      actionModel - The component action model.
      enableable - The enableable object in which to store enabled status.
      Throws:
      NullPointerException - if the given info model, action model, and/or enableable object is null.
  • Method Details

    • isAutoSelect

      public boolean isAutoSelect()
      Specified by:
      isAutoSelect in interface SelectActionControl
      Returns:
      Whether this control automatically sets or toggles the selection state when the action occurs.
    • setAutoSelect

      public void setAutoSelect(boolean newAutoSelect)
      Description copied from interface: SelectActionControl
      Sets whether this control automatically sets or toggles the selection state when the action occurs. This is a bound property of type Boolean.
      Specified by:
      setAutoSelect in interface SelectActionControl
      Parameters:
      newAutoSelect - true if the control should automatically set or toggle the selection state when an action occurs.
      See Also:
    • isSelected

      public boolean isSelected()
      Specified by:
      isSelected in interface Selectable
      Returns:
      Whether the object is selected.
    • setSelected

      public void setSelected(boolean newSelected)
      Description copied from interface: Selectable
      Sets whether the object is selected. This is a bound property of type Boolean.
      Specified by:
      setSelected in interface Selectable
      Parameters:
      newSelected - true if the object should be selected, else false.
      See Also:
    • getSelectedGlyphURI

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

      public void setSelectedGlyphURI(URI newSelectedIcon)
      Description copied from interface: SelectActionControl
      Sets the URI of the selected icon. This is a bound property of type URI.
      Specified by:
      setSelectedGlyphURI in interface SelectActionControl
      Parameters:
      newSelectedIcon - The new URI of the selected icon, which may be a resource URI.
      See Also:
    • isToggle

      public boolean isToggle()
      Specified by:
      isToggle in interface SelectActionControl
      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

      public void setToggle(boolean newToggle)
      Description copied from interface: SelectActionControl
      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.
      Specified by:
      setToggle in interface SelectActionControl
      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

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

      public void setUnselectedGlyphURI(URI newUnselectedIcon)
      Description copied from interface: SelectActionControl
      Sets the URI of the unselected icon. This is a bound property of type URI.
      Specified by:
      setUnselectedGlyphURI in interface SelectActionControl
      Parameters:
      newUnselectedIcon - The new URI of the unselected icon, which may be a resource URI.
      See Also: