|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wjhk.jupload2.gui.IconWorker
class IconWorker
The IconWorker class loads a icon from a file. It's called from a backup
thread created by the JUploadFileView class. This allows to load/calculate
icons in background. This prevent the applet to be freezed while icons are
loading.
Instances of this class can have the following status, in this order:
Field Summary | |
---|---|
(package private) File |
file
The file whose icon must be loaded. |
(package private) JFileChooser |
fileChooser
The current file chooser. |
(package private) JUploadFileView |
fileView
The current file view |
(package private) Icon |
icon
The icon for this file. |
(package private) int |
status
Current loading status for this worker |
(package private) static int |
STATUS_ERROR_WHILE_LOADING
Indicates that an error occurs, during the icon creation |
(package private) static int |
STATUS_LOADED
Indicates that the icon for this file has been loaded |
(package private) static int |
STATUS_LOADING
Indicated that the creation of the icon for this file has started. |
(package private) static int |
STATUS_NOT_LOADED
Indicates the loading of the icon for this file is not currently requested. |
(package private) static int |
STATUS_TO_BE_LOADED
Indicates the loading of the icon for this file has been requested, but has not started yet. |
(package private) UploadPolicy |
uploadPolicy
The current upload policy |
Constructor Summary | |
---|---|
IconWorker(UploadPolicy uploadPolicy,
JFileChooser fileChooser,
JUploadFileView fileView,
File file)
The constructor only stores the file. |
Method Summary | |
---|---|
(package private) Icon |
getIcon()
Returns the currently loaded icon for this file. |
(package private) void |
loadIcon()
Get the icon from the current upload policy, for this file. |
void |
run()
Implementation of the Runnable interface |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int STATUS_ERROR_WHILE_LOADING
static final int STATUS_LOADED
static final int STATUS_LOADING
static final int STATUS_TO_BE_LOADED
static final int STATUS_NOT_LOADED
UploadPolicy uploadPolicy
JFileChooser fileChooser
JUploadFileView fileView
File file
Icon icon
int status
Constructor Detail |
---|
IconWorker(UploadPolicy uploadPolicy, JFileChooser fileChooser, JUploadFileView fileView, File file)
file
- The file whose icon must be loaded/calculated.Method Detail |
---|
Icon getIcon()
void loadIcon()
STATUS_TO_BE_LOADED
. If not, this method does nothing.
public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |