Class FWProgressTaskEvent

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

public class FWProgressTaskEvent extends Object
Event sent to FWProgressTaskListeners when the state of a progress task changes. An event without task (null) is sent when a pipeline run has ended.
Author:
Andreas Enders
  • Constructor Details

    • FWProgressTaskEvent

      public FWProgressTaskEvent(FWProgressTask aTaskObject, JPanel aSourcePanel, net.simplace.core.FWObservable aObservable)
      Parameters:
      aTaskObject - the task whose state changed, or null at the end of a run
      aSourcePanel - panel to show in the progress view, or null
      aObservable - parameters used to replace tokens in the message, or null
    • FWProgressTaskEvent

      public FWProgressTaskEvent(FWProgressTask aTaskObject, JPanel aSourcePanel)
      Parameters:
      aTaskObject - the task whose state changed, or null at the end of a run
      aSourcePanel - panel to show in the progress view, or null
  • Method Details

    • isState

      public boolean isState(String aProgressState)
      Parameters:
      aProgressState - a state, one of the constants in FWProgressTask.State
      Returns:
      true if the task is in the given state
    • getProgressTask

      public FWProgressTask getProgressTask()
      Returns:
      the task, or null at the end of a run
    • getState

      public String getState()
      Returns:
      state of progressTask
    • getPercentOfTaskDone

      public int getPercentOfTaskDone()
      Returns:
      progress of the task in percent (0-100)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the message of the task with parameter tokens replaced, or null without task
    • getNumberOfTask

      public int getNumberOfTask()
      Returns:
      position of the task in the range of tasks, or 0 without task
    • getSourcePanel

      public JPanel getSourcePanel()
      Returns:
      the sourcePanel
    • setSourcePanel

      public void setSourcePanel(JPanel aSourcePanel)
      Parameters:
      aSourcePanel - panel to show in the progress view
    • getObservable

      public net.simplace.core.FWObservable getObservable()
      Returns:
      the parameters of the event, or null