|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.utils.PresentationBuilder
Field Summary | |
(package private) java.util.Vector |
allFiles
|
(package private) java.io.File |
baseDir
|
(package private) boolean |
debug
|
(package private) java.util.Vector |
figFiles
|
(package private) java.util.zip.ZipOutputStream |
ZOS
|
Constructor Summary | |
PresentationBuilder()
|
Method Summary | |
void |
addFigFilesToZip()
|
void |
closeZipOutputStream()
|
void |
copyAllFilesFromZipArchive(java.lang.String filename)
copy all files from the JAR/ZIP archive "filename" to our ZipOutputStream. |
void |
copySingleFile(java.lang.String zipname,
java.lang.String filename)
copy a single file "filename" under the new name "zipname" to the ZipOutputStream. |
void |
createMainClassManifestEntry()
add a default META-INF/MANIFEST.MF manifest file with a Main-Class: jfig.gui.PresentationViewer attribute to our ZipOutputStream. |
void |
createZipOutputStream(java.lang.String filename)
|
void |
findAllFiles(java.lang.String dirname)
|
void |
findAndAddFiles(java.lang.String dirname)
|
void |
findFigOrImageFiles(java.io.File directory)
search all FIG (.fig) and image (.gif, .jpg, .png, .xbm) files in the specified 'directory' and its subdirectories. |
void |
findPSFiles(java.io.File directory)
search all Postscript (.ps, .eps) files in the specified 'directory' and its subdirectories. |
java.lang.String |
generateJpt()
generate jpt index data from the contents of the figFiles vector. |
java.lang.String |
generateTeX()
generate a TeX slidelist for 'skript.tex' from the figFiles vector, which, despite its name, should contain a list of Postscript .ps files created by calling findPSFiles. |
java.lang.String |
getChapterName(java.io.File file)
try to construct a useful JPT chapter name from a given filename. |
java.lang.String |
getRelativeFilename(java.io.File file)
|
static void |
main(java.lang.String[] args)
main: parse the command line arguments, then do the work. |
void |
setBaseDir(java.io.File _dir)
|
static void |
usage()
print a usage message, then exit |
void |
writeJptZipEntry()
this method writes the list of all slides in this presentation into the file "00presentation.jpt", then adds this file to the ZipOutputStream. |
void |
writeZipEntry_OLD(java.lang.String filename)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.util.zip.ZipOutputStream ZOS
java.io.File baseDir
java.util.Vector figFiles
java.util.Vector allFiles
boolean debug
Constructor Detail |
public PresentationBuilder()
Method Detail |
public void createZipOutputStream(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
public void closeZipOutputStream() throws java.lang.Exception
java.lang.Exception
public void setBaseDir(java.io.File _dir)
public void findFigOrImageFiles(java.io.File directory) throws java.lang.Exception
All found FIG files are added to the figFiles Vector, which is later used to construct the .jpt index file. Also, all FIG files and all image files are added to the allFiles Vector, which is later used to select the files to be included in the output JAR archive.
java.lang.Exception
public void findAndAddFiles(java.lang.String dirname) throws java.lang.Exception
java.lang.Exception
public void findAllFiles(java.lang.String dirname) throws java.lang.Exception
java.lang.Exception
public void findPSFiles(java.io.File directory) throws java.lang.Exception
All found files are added to the figFiles Vector.
java.lang.Exception
public void writeZipEntry_OLD(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void addFigFilesToZip() throws java.lang.Exception
java.lang.Exception
public java.lang.String getRelativeFilename(java.io.File file)
public java.lang.String getChapterName(java.io.File file)
public void writeJptZipEntry() throws java.lang.Exception
java.lang.Exception
public java.lang.String generateJpt()
Instead of directly writing to some OutputStream, this method creates and returns a (possibly long) String with the complete jpt file data.
This method tries to be clever and will generate chapter jpt entries for each subdirectory with .fig files.
public java.lang.String generateTeX()
public void copyAllFilesFromZipArchive(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void copySingleFile(java.lang.String zipname, java.lang.String filename) throws java.io.IOException
java.io.IOException
public void createMainClassManifestEntry() throws java.io.IOException
java.io.IOException
public static void usage()
public static void main(java.lang.String[] args) throws java.lang.Exception
Currently, this class supports three different uses:
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |