|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.ceryle.ui.help.HelpProcess
public class HelpProcess
Extends Thread to create a help, evaluation or tutorial process. This is a sequence of actions specified by an XHTML-based script, where each activity is established by markup as shown in the following example. Each <div> element is considered as one slide of a slide show if it contains a class attribute whose value is "help". The <div> content can include XHTML markup (though links do not currently function).
<div class="help" id="q1" title="Question 1"><!-- ............................ --> <p> This is question one of the tutorial. Please turn to page 7 of your study guide, then stand on your head for ten minutes. If you do not feel rested and assured, see your doctor. When finished, go to question two by clicking on the <b>Next</b> button. </p> <script type="text/x-ceryle-helpscript"> OPENGRAPH "systemId" GRAPHSELECT "id" </script> </div>The <script> content is line-delimited list of HelpActions (which can be combined recursively), each containing an interpretable case-sensitive keyword followed by optional parameters (depending on the keyword), designed to initiate a specific action within the help processor.
See the HelpDialog for a list of available HelpActions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static String |
helpClass
The 'class' attribute value key indicating that a <div> is to be used as a Help slide. |
protected HelpDialog |
m_dlog
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
HelpProcess(HelpDialog dialog)
Constructor for the default Help process (the one shown upon opening Help). |
|
HelpProcess(HelpDialog dialog,
String scriptfile)
Constructor for a help process. |
|
HelpProcess(HelpDialog dialog,
String cid,
String nid)
Constructor for a help process whose Collection and document IDs are provided. |
|
| Method Summary | |
|---|---|
void |
close()
Called to end the sequence. |
protected void |
fireCounterUpdate()
Indicates a change to the slide counter. |
protected void |
index()
Open the first action. |
protected int |
indexOf(HelpAction action)
Returns the index number of the provided action, -1 if it is not contained in the list. |
boolean |
isDefault()
Returns true if this is the default process. |
boolean |
isEvaluation()
Returns true if this is identified as an evaluation process. |
protected boolean |
load(String id)
Process the action indicated by the supplied ID, returning true if loaded. |
protected void |
next()
Process the next action. |
protected void |
previous()
Process the previous action. |
protected List |
process(String cid,
String nid)
Processes the DOM Document resulting from parsing the XHTML file, given a TypedInputSource source containing its identifier. |
protected List |
process(TypedInputSource source)
Processes the DOM Document resulting from parsing the XHTML file, given a TypedInputSource source containing its identifier. |
protected void |
processImages(Element elt)
Provided an Element, process any descendant <img> elements' src attributes to provide a base file: URL that connects with the resource directory. |
void |
run()
Begin thread. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String helpClass
protected HelpDialog m_dlog
| Constructor Detail |
|---|
public HelpProcess(HelpDialog dialog)
public HelpProcess(HelpDialog dialog,
String cid,
String nid)
public HelpProcess(HelpDialog dialog,
String scriptfile)
| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Threadpublic boolean isDefault()
public boolean isEvaluation()
protected int indexOf(HelpAction action)
protected void index()
protected boolean load(String id)
protected void previous()
protected void next()
protected void fireCounterUpdate()
protected List process(String cid,
String nid)
protected List process(TypedInputSource source)
protected void processImages(Element elt)
public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||