|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.hdf.cdnavigator.PrepareFiles
public class PrepareFiles
Prepare real files on CDs from file names stored in DB.
Search files in cache or mount CD.
Relative file names are specified by array of FileRecord objects.
Array you go by method step().
Array indexation can be randomized (for slide show).
| Field Summary | |
|---|---|
private boolean |
cacheFiles
cache new founded files on CD? |
private int |
index
index in records array |
private java.util.ArrayList<java.lang.Integer> |
indexes
records indexes order |
private int |
lastCDID
CD ID of last shown file. |
private java.util.logging.Logger |
logger
Logger. |
private cz.hdf.gui.HProgressDialog |
progressDialog
|
private java.util.ArrayList<FileRecord> |
records
file data to prepare |
private boolean |
slideRandom
create indexes with random order |
private boolean |
slideRepeat
create indexes with repeating numbers |
| Constructor Summary | |
|---|---|
PrepareFiles(java.util.ArrayList<FileRecord> _records,
boolean _cacheFiles,
boolean _slideRandom,
boolean _slideRepeat)
Initialize list of photos to cache. |
|
PrepareFiles(java.util.ArrayList<FileRecord> _records,
boolean _cacheFiles,
boolean _slideRandom,
boolean _slideRepeat,
cz.hdf.gui.HProgressDialog _progressDialog)
Initialize list of photos to cache. |
|
| Method Summary | |
|---|---|
static java.io.File |
getCacheFile(CDData _cd,
java.lang.String _relFileName)
Try to find file in cache. |
static java.io.File |
getCDFile(java.io.File _mountDir,
java.lang.String _relFileName)
Try to find file on CD. |
java.io.File |
getFile(CDData _cd,
java.lang.String _relFileName)
Try to find file in cache. |
FileRecord |
getFileRecord()
? |
FileRecord |
getFileRecord(int _index)
? |
java.util.ArrayList<java.lang.Integer> |
getIndexes()
|
FileRecord |
getNextFileRecord()
? |
java.io.File |
getPreparedFile()
Try to find file in cache. |
java.io.File |
getPreparedNextFile()
Try to find file in cache. |
FileRecord |
getPrevFileRecord()
? |
int |
getSize()
Return the length of records array. |
boolean |
hasNext()
? |
boolean |
hasPrev()
? |
boolean |
isRandom()
|
boolean |
isRepeat()
|
private FileRecord |
prepareFile(int _index)
prepare next file to show |
void |
removeFileRecord()
|
void |
setIndex(int _index)
Set relative index. |
void |
stepNext()
? |
void |
stepPrev()
? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.ArrayList<FileRecord> records
private boolean slideRandom
private boolean slideRepeat
private boolean cacheFiles
private int index
private java.util.ArrayList<java.lang.Integer> indexes
private int lastCDID
private cz.hdf.gui.HProgressDialog progressDialog
private java.util.logging.Logger logger
| Constructor Detail |
|---|
public PrepareFiles(java.util.ArrayList<FileRecord> _records,
boolean _cacheFiles,
boolean _slideRandom,
boolean _slideRepeat)
_records - _cacheFiles - _slideRandom - _slideRepeat -
public PrepareFiles(java.util.ArrayList<FileRecord> _records,
boolean _cacheFiles,
boolean _slideRandom,
boolean _slideRepeat,
cz.hdf.gui.HProgressDialog _progressDialog)
_records - _cacheFiles - _slideRandom - _slideRepeat - | Method Detail |
|---|
public boolean isRepeat()
public boolean isRandom()
public void setIndex(int _index)
public int getSize()
private FileRecord prepareFile(int _index)
_index - real index to records array
public boolean hasPrev()
public boolean hasNext()
public void stepPrev()
public void stepNext()
public void removeFileRecord()
public java.util.ArrayList<java.lang.Integer> getIndexes()
public FileRecord getFileRecord()
public FileRecord getPrevFileRecord()
public FileRecord getNextFileRecord()
public FileRecord getFileRecord(int _index)
_index -
public java.io.File getPreparedFile()
throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.io.File getPreparedNextFile()
throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.io.File getFile(CDData _cd,
java.lang.String _relFileName)
throws java.io.FileNotFoundException
_cdID - ID of CD with file_relFileName - relative file name
java.io.FileNotFoundException
public static java.io.File getCacheFile(CDData _cd,
java.lang.String _relFileName)
_cdID - ID of CD with file_relFileName - relative file name
public static java.io.File getCDFile(java.io.File _mountDir,
java.lang.String _relFileName)
_relFileName - relative file name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||