Package export.swing

Class ExportTask


public class ExportTask extends OfflineTask<PamDataUnit<?,?>>
Export data to a file type.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • prepareTask

      public void prepareTask()
      Called at the start of the thread which executes this task.
      Overrides:
      prepareTask in class OfflineTask<PamDataUnit<?,?>>
    • getName

      public String getName()
      Specified by:
      getName in class OfflineTask<PamDataUnit<?,?>>
      Returns:
      a name for the task, to be displayed in the dialog.
    • processDataUnit

      public boolean processDataUnit(PamDataUnit<?,?> dataUnit)
      Description copied from class: OfflineTask
      Process a single data unit.
      Specified by:
      processDataUnit in class OfflineTask<PamDataUnit<?,?>>
      Returns:
      true if the data unit has changed in some way so that it will need re-writing to it's binary file or database.
    • newDataLoad

      public void newDataLoad(long startTime, long endTime, OfflineDataMapPoint mapPoint)
      Description copied from class: OfflineTask
      Called when new data are loaded for offline processing (or once at the start of processing loaded data).
      Specified by:
      newDataLoad in class OfflineTask<PamDataUnit<?,?>>
      Parameters:
      startTime - start time of loaded data
      endTime - end time of loaded data
    • loadedDataComplete

      public void loadedDataComplete()
      Description copied from class: OfflineTask
      Called when processing of loaded data, or each map point worth of data, is complete.
      Specified by:
      loadedDataComplete in class OfflineTask<PamDataUnit<?,?>>
    • hasSettings

      public boolean hasSettings()
      task has settings which can be called
      Overrides:
      hasSettings in class OfflineTask<PamDataUnit<?,?>>
      Returns:
      true or false
    • callSettings

      public boolean callSettings()
      Call any task specific settings
      Overrides:
      callSettings in class OfflineTask<PamDataUnit<?,?>>
      Returns:
      true if settings may have changed.
    • canExport

      public boolean canExport(int exportSelection)
      Set whether the task can export based on the current selection
      Parameters:
      exportSelection - - the index of the selected exporter
    • canRun

      public boolean canRun()
      Description copied from class: OfflineTask
      can the task be run ? This will generally be true, but may be false if the task is dependent on some other module which may not be present.
      Overrides:
      canRun in class OfflineTask<PamDataUnit<?,?>>
      Returns:
      true if it's possible to run the task.