- All Implemented Interfaces:
Runnable
,Future<Integer>
,RunnableFuture<Integer>
A Class which brings up a progress bar and adds pictures to the specified node.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds the indicated files to the current node if they are valid pictures.protected void
done()
Sends a model notification about the change and updates the cancel button to an OK buttonprotected void
The Swing Worker sends the publish() events here on the EDT when it feels like it.Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
PictureAdder
Constructor- Parameters:
request
- The request to fulfill
-
-
Method Details
-
doInBackground
Adds the indicated files to the current node if they are valid pictures. If the newOnly Flag is on then the collection is checked to see if the picture is already present. It also opens a progress Gui to provide feedback to the user.- Specified by:
doInBackground
in classSwingWorker<Integer,
Integer> - Returns:
- A string
-
process
The Swing Worker sends the publish() events here on the EDT when it feels like it.- Overrides:
process
in classSwingWorker<Integer,
Integer> - Parameters:
chunks
- Send 1 to increment the count of pictures processed, -1 to decrement the total
-
done
protected void done()Sends a model notification about the change and updates the cancel button to an OK button- Overrides:
done
in classSwingWorker<Integer,
Integer>
-