Class TaskCardConstraints

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Constraints, Displayable, Enableable, InfoModel, LabelModel, Model

public class TaskCardConstraints extends CardConstraints
Constraints on an individual component representing a task in a card layout.
Author:
Garret Wilson
  • Field Details

    • TASK_STATE_PROPERTY

      public static final String TASK_STATE_PROPERTY
      The task state bound property.
  • Constructor Details

    • TaskCardConstraints

      public TaskCardConstraints()
      Default constructor.
    • TaskCardConstraints

      public TaskCardConstraints(boolean enabled)
      Enabled constructor.
      Parameters:
      enabled - Whether the card is enabled.
    • TaskCardConstraints

      public TaskCardConstraints(String label)
      Label constructor.
      Parameters:
      label - The text of the label.
    • TaskCardConstraints

      public TaskCardConstraints(String label, boolean enabled)
      Label and enabled constructor.
      Parameters:
      label - The text of the label.
      enabled - Whether the card is enabled.
    • TaskCardConstraints

      public TaskCardConstraints(InfoModel infoModel)
      Info model constructor.
      Parameters:
      infoModel - The info model representing the card label.
      Throws:
      NullPointerException - if the given info model is null.
    • TaskCardConstraints

      public TaskCardConstraints(InfoModel infoModel, boolean enabled)
      Info model and enabled constructor.
      Parameters:
      infoModel - The info model representing the card label.
      enabled - Whether the card is enabled.
      Throws:
      NullPointerException - if the given info model is null.
  • Method Details

    • getTaskState

      public com.globalmentor.model.TaskState getTaskState()
      Returns:
      The current task state of this card, or null if no task has been started in relation to this card.
    • setTaskState

      public void setTaskState(com.globalmentor.model.TaskState newTaskState)
      Sets the task state of the card. This is a bound property.
      Parameters:
      newTaskState - true if the corresponding card can be selected.
      See Also: