Package pamViewFX.pamTask
Class SimplePamTaskUpdate
java.lang.Object
pamViewFX.pamTask.PamTaskUpdate
pamViewFX.pamTask.SimplePamTaskUpdate
Simple implementation of PAMTaskUpdate which returns 100% by default.
- Author:
- Jamie Macaulay
-
Field Summary
Fields inherited from class pamViewFX.pamTask.PamTaskUpdate
STATUS_ANALYSING_FILES, STATUS_COUNTING_FILES, STATUS_DESERIALIZING, STATUS_DONE, STATUS_DONE_ERROR, STATUS_IDLE, STATUS_SERIALIZING, STATUS_SORTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the load thread.doubleGet the progress of the load thread.intvoidsetProgress(double progress) Set the progress of the task.Methods inherited from class pamViewFX.pamTask.PamTaskUpdate
getProgress2, getProgressString, getProgressString2, isDualProgressUpdate, setDualProgressUpdate, setStatus
-
Constructor Details
-
SimplePamTaskUpdate
-
-
Method Details
-
getName
Description copied from class:PamTaskUpdateGet 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.- Specified by:
getNamein classPamTaskUpdate- Returns:
- the name of the thread.
-
getStatus
public int getStatus()- Overrides:
getStatusin classPamTaskUpdate- Returns:
- the status
-
getProgress
public double getProgress()Description copied from class:PamTaskUpdateGet 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.
- Specified by:
getProgressin classPamTaskUpdate- Returns:
- the progress of the thread, between 0 and 1.
-
setProgress
public void setProgress(double progress) Set the progress of the task.- Parameters:
progress- - progress from 0 to 1 where 1 is 100%
-