com.partnersoft.modules.inspection.app
Class InspectionProgressWorker

java.lang.Object
  extended by com.partnersoft.gadgets.ActivityProgressWorker
      extended by com.partnersoft.modules.inspection.app.InspectionProgressWorker
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
InspectionFindWorker, InspectionTraceNearbyWorker

public class InspectionProgressWorker
extends com.partnersoft.gadgets.ActivityProgressWorker

Handles parsing a list of data IDs to attempt and create Inspections. Can be setup to only inspect specific data types and to pause between inspections. Stores map's original selection and center position before inspection begins and restores when finished or canceled. Each object assigns itself to the passed ActivityProgressControl as it's worker, and setups up it's current activity and description.

Copyright 2008 Partner Software

Author:
Rich Stepanski

Field Summary
protected  com.partnersoft.maps.app.MapApp app
           
protected  InspectionProgressBar bar
           
protected  com.partnersoft.gui.ActivityProgressControl control
           
protected  com.partnersoft.data.Naming copyData
           
protected  java.util.List<java.lang.Integer> dataIds
           
protected  java.util.List<java.lang.String> dataTypes
           
protected  long delay
           
protected  InspectionKit kit
           
protected  boolean useDelay
           
 
Constructor Summary
InspectionProgressWorker(com.partnersoft.maps.app.MapApp app, InspectionKit kit, com.partnersoft.gui.ActivityProgressControl monitor, InspectionProgressBar bar, java.util.List<java.lang.Integer> dataIds, com.partnersoft.data.Naming copyData)
          Creates an InspectionProgressWorker.
InspectionProgressWorker(com.partnersoft.maps.app.MapApp app, InspectionKit kit, com.partnersoft.gui.ActivityProgressControl monitor, InspectionProgressBar bar, java.util.List<java.lang.String> dataTypes, java.util.List<java.lang.Integer> dataIds, com.partnersoft.data.Naming copyData)
          Creates an InspectionProgressWorker.
InspectionProgressWorker(com.partnersoft.maps.app.MapApp app, InspectionKit kit, com.partnersoft.gui.ActivityProgressControl monitor, InspectionProgressBar bar, java.util.List<java.lang.String> dataTypes, java.util.List<java.lang.Integer> dataIds, com.partnersoft.data.Naming copyData, boolean useDelay)
          Creates an InspectionProgressWorker.
InspectionProgressWorker(com.partnersoft.maps.app.MapApp app, InspectionKit kit, com.partnersoft.gui.ActivityProgressControl monitor, InspectionProgressBar bar, java.util.List<java.lang.String> dataTypes, java.util.List<java.lang.Integer> dataIds, com.partnersoft.data.Naming copyData, boolean useDelay, long delay)
          Creates an InspectionProgressWorker.
 
Method Summary
 void run()
           
 
Methods inherited from class com.partnersoft.gadgets.ActivityProgressWorker
cancelWork, finishedWorking, isCanceled, isPaused, keepRunning, setPause, startRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bar

protected InspectionProgressBar bar

control

protected com.partnersoft.gui.ActivityProgressControl control

dataTypes

protected java.util.List<java.lang.String> dataTypes

dataIds

protected java.util.List<java.lang.Integer> dataIds

app

protected com.partnersoft.maps.app.MapApp app

kit

protected InspectionKit kit

copyData

protected com.partnersoft.data.Naming copyData

delay

protected long delay

useDelay

protected boolean useDelay
Constructor Detail

InspectionProgressWorker

public InspectionProgressWorker(com.partnersoft.maps.app.MapApp app,
                                InspectionKit kit,
                                com.partnersoft.gui.ActivityProgressControl monitor,
                                InspectionProgressBar bar,
                                java.util.List<java.lang.Integer> dataIds,
                                com.partnersoft.data.Naming copyData)
Creates an InspectionProgressWorker. Attempts to create an inspection from the passed kit on each of the passed map data IDs, updating the passed ActivityProgressControl as it goes.

Parameters:
app - - Valid app, used for selection,centering, and map data.
kit - - InspectionKit to use for creating inspections.
control - - The ActivityProgressControl that is monitoring this Worker.
dataIds - - list of Integer map Data IDs to inspect.

InspectionProgressWorker

public InspectionProgressWorker(com.partnersoft.maps.app.MapApp app,
                                InspectionKit kit,
                                com.partnersoft.gui.ActivityProgressControl monitor,
                                InspectionProgressBar bar,
                                java.util.List<java.lang.String> dataTypes,
                                java.util.List<java.lang.Integer> dataIds,
                                com.partnersoft.data.Naming copyData)
Creates an InspectionProgressWorker. Attempts to create an inspection from the passed kit on each of the passed map data IDs, updating the passed ActivityProgressControl as it goes.

Parameters:
app - - Valid app, used for selection,centering, and map data.
kit - - InspectionKit to use for creating inspections.
control - - The ActivityProgressControl that is monitoring this Worker.
dataTypes - - A list of string data types to inspect. Only map items matching these types will be inspected. If dataTypes is null, every item is inspected.
dataIds - - list of Integer map Data IDs to inspect.

InspectionProgressWorker

public InspectionProgressWorker(com.partnersoft.maps.app.MapApp app,
                                InspectionKit kit,
                                com.partnersoft.gui.ActivityProgressControl monitor,
                                InspectionProgressBar bar,
                                java.util.List<java.lang.String> dataTypes,
                                java.util.List<java.lang.Integer> dataIds,
                                com.partnersoft.data.Naming copyData,
                                boolean useDelay)
Creates an InspectionProgressWorker. Attempts to create an inspection from the passed kit on each of the passed map data IDs, updating the passed ActivityProgressControl as it goes. Has flag useDelay to determine if a 15ms pause should be done between inspections.

Parameters:
app - - Valid app, used for selection,centering, and map data.
kit - - InspectionKit to use for creating inspections.
control - - The ActivityProgressControl that is monitoring this Worker.
dataTypes - - A list of string data types to inspect. Only map items matching these types will be inspected. If dataTypes is null, every item is inspected.
dataIds - - list of Integer map Data IDs to inspect.
useDelay - - Pauses for 15ms between inspections if true.

InspectionProgressWorker

public InspectionProgressWorker(com.partnersoft.maps.app.MapApp app,
                                InspectionKit kit,
                                com.partnersoft.gui.ActivityProgressControl monitor,
                                InspectionProgressBar bar,
                                java.util.List<java.lang.String> dataTypes,
                                java.util.List<java.lang.Integer> dataIds,
                                com.partnersoft.data.Naming copyData,
                                boolean useDelay,
                                long delay)
Creates an InspectionProgressWorker. Attempts to create an inspection from the passed kit on each of the passed map data IDs, updating the passed ActivityProgressControl as it goes. useDelay determines if the passed long delay should be used to pause in ms between each inspection.

Parameters:
app - - Valid app, used for selection,centering, and map data.
kit - - InspectionKit to use for creating inspections.
control - - The ActivityProgressControl that is monitoring this Worker.
dataTypes - - A list of string data types to inspect. Only map items matching these types will be inspected. If dataTypes is null, every item is inspected.
dataIds - - list of Integer map Data IDs to inspect.
useDelay - - Pauses for passed delay between inspections if true.
delay - - Number of ms to pause between inspections.
Method Detail

run

public void run()