Class PamTaskUpdate

java.lang.Object
pamViewFX.pamTask.PamTaskUpdate
Direct Known Subclasses:
BinaryMapMakeProgress, CreateMapInfo, DatagramProgress, FileMapProgress, LoadQueueProgressData, SimplePamTaskUpdate

public abstract class PamTaskUpdate extends Object
Class for passing information from loading tasks to the FX GUI.
Author:
Jamie Macaulay
  • Field Details Link icon

    • STATUS_IDLE Link icon

      public static final int STATUS_IDLE
      The loading of data is idle
      See Also:
    • STATUS_COUNTING_FILES Link icon

      public static final int STATUS_COUNTING_FILES
      Currently counting files
      See Also:
    • STATUS_ANALYSING_FILES Link icon

      public static final int STATUS_ANALYSING_FILES
      Analysing files
      See Also:
    • STATUS_SORTING Link icon

      public static final int STATUS_SORTING
      Sorting something, e.g. file list
      See Also:
    • STATUS_SERIALIZING Link icon

      public static final int STATUS_SERIALIZING
      See Also:
    • STATUS_DESERIALIZING Link icon

      public static final int STATUS_DESERIALIZING
      See Also:
    • STATUS_DONE Link icon

      public static final int STATUS_DONE
      The task has completed successfully
      See Also:
    • STATUS_DONE_ERROR Link icon

      public static final int STATUS_DONE_ERROR
      The task has completed but an error was flagged. It is possible that the task did not complete successfully.
      See Also:
  • Constructor Details Link icon

    • PamTaskUpdate Link icon

      public PamTaskUpdate()
  • Method Details Link icon

    • getName Link icon

      public abstract String getName()
      Get the name of the load thread. Note the name is also the unique identifier for the running thread so cannot be the same between two different threads.
      Returns:
      the name of the thread.
    • getProgress Link icon

      public abstract double getProgress()
      Get the progress of the load thread. This is a value between 0 and 1 were 1 is equivalent to 100% or the thread having finished.

      Note that ProgressIndicator.INTERMEDIATE can be used as an update value to set progress to intermediate.

      Returns:
      the progress of the thread, between 0 and 1.
    • getProgress2 Link icon

      public double getProgress2()
      There may be a need for two progress bars for long task- one showing overall progress and the other showing more fine scale loading tasks. If this is the case then

      Note that ProgressIndicator.INTERMEDIATE can be used as an update value to set progress to intermediate.

      Returns:
      the progress of the thread, between 0 and 1.
    • getStatus Link icon

      public int getStatus()
      Returns:
      the status
    • setStatus Link icon

      public void setStatus(int status)
      Set the status of the thread. This can either a generic status from the abstract class or a custom status.
      Parameters:
      status - flag to set.
    • isDualProgressUpdate Link icon

      public boolean isDualProgressUpdate()
      There may be two progress updates, one overall progress and then a finer scale progress.
      Returns:
      true if two progress updates.
    • setDualProgressUpdate Link icon

      public void setDualProgressUpdate(boolean twoProgUpdate)
      Set if there should be two progress updates, one overall progress and then a finer scale progress.
      Parameters:
      true - if two progress updates.
    • getProgressString Link icon

      public String getProgressString()
      Returns a message indicating progress. Can be overriden to supply other messages.
      Returns:
    • getProgressString2 Link icon

      public String getProgressString2()
      If two updates are available then this is used to return the fine progress update message.
      Returns: