Class AbstractEditValueControl<V>

Type Parameters:
V - The type of value to represent.
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<V>, com.globalmentor.model.Valued<V>, Component, Control, EditComponent, InputFocusableComponent, ValueControl<V>, ValuedComponent<V>, EditListenable, Displayable, Enableable, InfoModel, LabelModel, Model, PresentationModel, ValueModel<V>, DepictedObject
Direct Known Subclasses:
AbstractTextControl, CheckControl, ResourceImportControl, SliderControl

public abstract class AbstractEditValueControl<V> extends AbstractValueControl<V> implements EditComponent
Abstract value control that is an edit component.
Author:
Garret Wilson
  • Constructor Details

    • AbstractEditValueControl

      public AbstractEditValueControl(InfoModel infoModel, ValueModel<V> valueModel, Enableable enableable)
      Info model, value model, and enableable constructor.
      Parameters:
      infoModel - The component info model.
      valueModel - The component value model.
      enableable - The enableable object in which to store enabled status.
      Throws:
      NullPointerException - if the given info model, value model, and/or enableable object is null.
  • Method Details

    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in interface EditComponent
      Returns:
      Whether the value is editable and the component will allow the the user to change the value.
    • setEditable

      public void setEditable(boolean newEditable)
      Description copied from interface: EditComponent
      Sets whether the value is editable and the component will allow the the user to change the value. This is a bound property of type Boolean.
      Specified by:
      setEditable in interface EditComponent
      Parameters:
      newEditable - true if the component should allow the user to change the value.
      See Also:
    • addEditListener

      public void addEditListener(EditListener editListener)
      Description copied from interface: EditListenable
      Adds an edit listener.
      Specified by:
      addEditListener in interface EditListenable
      Parameters:
      editListener - The edit listener to add.
    • removeEditListener

      public void removeEditListener(EditListener editListener)
      Description copied from interface: EditListenable
      Removes an edit listener.
      Specified by:
      removeEditListener in interface EditListenable
      Parameters:
      editListener - The edit listener to remove.
    • fireEdited

      protected void fireEdited()
      Fires an edit event to all registered edit listeners. This method delegates to fireEdited(EditEvent).
      See Also:
    • fireEdited

      protected void fireEdited(EditEvent editEvent)
      Fires a given edit event to all registered edit listeners.
      Parameters:
      editEvent - The edit event to fire.