Class AbstractSequenceTaskPanel

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, io.clogr.Clogged, Box, Component, CompositeComponent, Container, LayoutComponent, Panel, Displayable, InfoModel, LabelModel, Model, PresentationModel, DepictedObject, Iterable<Component>

public abstract class AbstractSequenceTaskPanel extends AbstractPanel
Abstract base class for a panel that allows progression in a sequence.

When progressing through the sequence, this panel attempts to verify the content component, if it is Verifiable, before changing position in the sequence and before finishing.

Author:
Garret Wilson
See Also:
  • Verifiable
  • Constructor Details

    • AbstractSequenceTaskPanel

      public AbstractSequenceTaskPanel(SequenceTaskController taskController)
      Task controller constructor.
      Parameters:
      taskController - The object controlling the sequence task.
      Throws:
      NullPointerException - if the given task controller is null.
  • Method Details

    • isDistinctAdvance

      public boolean isDistinctAdvance()
      Returns:
      Whether the advance buttons are distinct or dual-duty; this defaults to false.
    • setDistinctAdvance

      public void setDistinctAdvance(boolean newDistinctAdvance)
      Sets whether the advance buttons are distinct or dual-duty. This method updates the toolbar if this property changes.
      Parameters:
      newDistinctAdvance - true if there should be distinct buttons for start, next, and finish, or false if one button should share these responsibilities.
    • getTaskController

      public SequenceTaskController getTaskController()
      Returns:
      The object controlling the sequence task.
    • configureToolbar

      protected void configureToolbar()
      Clears and the appropriate components to the toolbar based upon the current settings.
      See Also:
    • onSequenceIndexChange

      protected void onSequenceIndexChange(int oldIndex, int newIndex)
      Called after the sequence index changes. Any derived class that overrides this method should call this version.
      Parameters:
      oldIndex - The old index, or -1 if there was no old index.
      newIndex - The new index, or -1 if there was no new index.