Class FWProgressViewModel

java.lang.Object
net.simplace.pipe.progress.FWProgressViewModel

public class FWProgressViewModel extends Object
Model of the progress view: the progress tasks, sorted by their number in range.
Author:
Andreas Enders
  • Constructor Details

    • FWProgressViewModel

      public FWProgressViewModel(int aCount)
      Parameters:
      aCount - initial count; added tasks are numbered from aCount + 1
    • FWProgressViewModel

      public FWProgressViewModel(Vector<FWProgressTask> aTaskVector)
      Parameters:
      aTaskVector - the tasks; they are numbered in the order of the vector (before, tasks with equal numbers, e.g. all unnumbered ones, were dropped and the image flag was not set)
    • FWProgressViewModel

      public FWProgressViewModel()
      Creates an empty model.
  • Method Details

    • addProgressTask

      public void addProgressTask(FWProgressTask aTask)
      Adds a task and numbers it as the last one.
      Parameters:
      aTask - the task; null is ignored
    • addProgressTask

      public void addProgressTask(String aProgressID, String aX, String aY, String aSystemID)
      Creates a task and adds it as the last one.
      Parameters:
      aProgressID - progress id of the task
      aX - x position of the task's image, or null
      aY - y position of the task's image, or null
      aSystemID - id of the system, or null
    • getProgressTasks

      public Collection<FWProgressTask> getProgressTasks()
      Returns:
      the tasks sorted by number in range, or null if none was added
    • getCount

      public int getCount()
      Returns:
      number of tasks
    • areImagesUsed

      protected boolean areImagesUsed()
      Returns:
      true if a task added with addProgressTask(FWProgressTask) has an image