|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.utils.PresentationParser
parse and manage jfig presentations.
PresentationParser: a class to read, parse, and manage jfig presentation files. The idea behind a jfig presentation is to collect individual drawings into a simple multi-page presentation. The corresponding viewer runs as both an applet or application and allows the usual navigation, e.g. first page, next page, next chapter, etc.
In order to avoid a new complex file format, the presentation file does not contain the individual pages. Instead, it simply lists the filenames/URLs for the pages. While it is possible to use absolute pathnames, you are encouraged to use relative pathnames. The PresentationParser will complete a relative pathname with the pathname to the presentation file.
Currently, the only structuring commands are pages (called slides), chapters consisting of an arbitrary number of slides, and books, consisting of chapters.
For example, a simple presentation might look like this:
#jfig presentation chapter title="Introduction" slide title="jfig presentations" href="intro/presentation.fig" slide title="A demo" href="intro/demo.fig" slide href="intro/notitle.fig" ... chapter title="File format" slide title="The file format" href="spec/fileformat.fig" slide title="Syntax (BNF)" href="spec/bnf.fig" slide title="Example" href="spec/example.fig" ... ... # comment line
Field Summary | |
static boolean |
debug
|
static java.lang.String |
DUMMY_TITLE
|
static java.lang.String |
DUMMY_URL
|
static int |
N_CHAPTERS
|
static int |
N_SLIDES
|
Constructor Summary | |
PresentationParser()
|
Method Summary | |
static void |
dbg(java.lang.String msg)
|
void |
decodeTokens(java.util.Vector vector,
int line)
|
void |
dumpData()
|
java.lang.String[] |
getChapterTitles()
|
int |
getCurrentChapterIndex()
|
java.lang.String[] |
getCurrentChapterSlideTitles()
|
java.lang.String |
getCurrentChapterTitle()
|
int |
getCurrentSlideIndex()
|
java.lang.String |
getCurrentSlideTitle()
|
java.lang.String |
getFirstSlide()
return the pathname (URL) of the first slide in this presentation. |
java.lang.String |
getLastSlide()
return the pathname (URL) of the last slide in this presentation. |
java.lang.String |
getNextChapter()
|
java.lang.String |
getNextSlide()
|
int |
getNumberOfSlides()
|
java.lang.String |
getPreviousChapter()
|
java.lang.String |
getPreviousSlide()
|
java.lang.String |
getSlide(int pageNumber)
|
java.lang.String |
getSlide(int chapterIndex,
int slideIndex)
|
boolean |
hasNextChapter()
|
boolean |
hasNextSlide()
|
boolean |
hasPreviousChapter()
|
boolean |
hasPreviousSlide()
|
(package private) void |
initData()
|
static void |
main(java.lang.String[] args)
|
static void |
msg(java.lang.String msg)
|
void |
parse(java.io.InputStream IS)
|
void |
setBasename(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean debug
public static final int N_SLIDES
public static final int N_CHAPTERS
public static java.lang.String DUMMY_TITLE
public static java.lang.String DUMMY_URL
Constructor Detail |
public PresentationParser()
Method Detail |
void initData()
public void setBasename(java.lang.String s)
public java.lang.String getFirstSlide()
public java.lang.String getLastSlide()
public java.lang.String getSlide(int pageNumber)
public java.lang.String getSlide(int chapterIndex, int slideIndex)
public boolean hasNextSlide()
public boolean hasPreviousSlide()
public java.lang.String getNextSlide()
public java.lang.String getPreviousSlide()
public boolean hasNextChapter()
public boolean hasPreviousChapter()
public java.lang.String getNextChapter()
public java.lang.String getPreviousChapter()
public int getCurrentChapterIndex()
public java.lang.String getCurrentChapterTitle()
public java.lang.String[] getChapterTitles()
public java.lang.String getCurrentSlideTitle()
public int getCurrentSlideIndex()
public int getNumberOfSlides()
public java.lang.String[] getCurrentChapterSlideTitles()
public void parse(java.io.InputStream IS) throws java.lang.Exception
java.lang.Exception
public void decodeTokens(java.util.Vector vector, int line)
public void dumpData()
public static void dbg(java.lang.String msg)
public static void msg(java.lang.String msg)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |