- 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.StateValueNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the indicated files to the current node if they are valid pictures.protected voiddone()Sends a model notification about the change and updates the cancel button to an OK buttonprotected voidThe 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, setProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
doInBackgroundin classSwingWorker<Integer,Integer> - Returns:
- A string
-
process
The Swing Worker sends the publish() events here on the EDT when it feels like it.- Overrides:
processin 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:
donein classSwingWorker<Integer,Integer>
-