|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pavlov.main.AbstractPavlovApplication
public abstract class AbstractPavlovApplication
An abstract class that handles most of the work of a Pavlov Application, whether it be applet, servlet, client-server, or standalone.
Field Summary | |
---|---|
protected PlugletLoader |
feedbackPlugins
Manages non-Velocity feedback pluglets. |
protected AbstractLibrary |
library
Describe variable library here. |
protected String |
libraryFile
The directory containing book files. |
protected String |
password
The user's password, used before login. |
protected Quiz |
quiz
Describes the quiz in progress, if any. |
protected ResourceBroker |
rb
|
protected StrategyLoader |
strategyPlugins
Manages question selection strategy pluglets. |
protected PlugletLoader |
toolPluglets
Manages tool pluglets. |
protected User |
user
The current user. |
protected String |
userName
The user's name, used before login. |
protected VelocityPlugletLoader |
velocityPlugins
Manages Velocity feedback pluglets. |
Constructor Summary | |
---|---|
protected |
AbstractPavlovApplication(String[] args)
Creates a new AbstractPavlovApplication instance. |
Method Summary | |
---|---|
protected abstract void |
closeSplashScreen()
Called when startup is finished, delegates to UIBuilder's closeSplashScreen. |
protected abstract boolean |
confirmQuit()
Asks the user if he's sure he wants to quit. |
abstract void |
createQuizSelector()
Creates the UI widget that allows the user to select a chapter to start a quiz. |
AbstractLibrary |
getLibrary()
Returns the library which is supplying questions. |
Quiz |
getQuiz()
Describe getQuiz method here. |
String |
getResourceString(String key,
String def)
Returns the named resource value or the given default, if the resource value is unavailable. |
User |
getUser()
Returns the active user. |
protected AbstractLibrary |
loadLibrary()
Reads in the library. |
abstract void |
loadPluglets()
Loads all the feedback, strategy, and tool pluglets. |
protected abstract void |
loginFinished()
Describe loginFinished method here. |
void |
logonAttempt(LogonEvent event)
The LoginController calls this when the user has finished logging in. |
abstract void |
newSetStatus(int pos,
String key)
|
void |
niceQuit(boolean confirm)
Ask the user if he really wants to quit. |
void |
processArguments(String[] args)
Process command line arguments. |
void |
registerFeedbackPlugins(Quiz theQuiz)
Sets the feedbackpluglets as answerListeners for the quiz. |
void |
saveUser()
Save's the user's progress. |
void |
setPassword(String na)
Sets the user password, useful only before login. |
void |
setQuiz(Quiz q)
Describe setQuiz method here. |
abstract void |
setStatus(int pos,
String msg)
Shows the user startup status, delegates to getUIBuilder()'s setStatus. |
protected void |
setup()
|
void |
setUserName(String na)
Sets the user name, useful only before login. |
abstract void |
showIncorrectDialog(String msg)
Show the user that his answer was incorrect. |
protected abstract void |
showLoginController(AbstractPavlovApplication abs)
|
protected abstract void |
showSplashScreen()
Keep the user entertained and informed during startup. |
protected void |
validate(User u,
AbstractLibrary l)
Coordinates the users question data with question in the active library. |
protected void |
warn(String key,
Exception ex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected User user
protected String userName
protected String password
protected String libraryFile
protected AbstractLibrary library
library
here.
protected Quiz quiz
protected VelocityPlugletLoader velocityPlugins
protected PlugletLoader feedbackPlugins
protected StrategyLoader strategyPlugins
protected PlugletLoader toolPluglets
protected ResourceBroker rb
Constructor Detail |
---|
protected AbstractPavlovApplication(String[] args)
AbstractPavlovApplication
instance.
args[]
- a String
valueMethod Detail |
---|
protected void setup()
protected abstract void loginFinished()
loginFinished
method here.
protected abstract void showLoginController(AbstractPavlovApplication abs)
protected void warn(String key, Exception ex)
public void logonAttempt(LogonEvent event)
logonAttempt
in interface LogonListener
event
- a LogonEvent
valuepublic Quiz getQuiz()
getQuiz
method here.
Quiz
valuepublic void setQuiz(Quiz q)
setQuiz
method here.
q
- a Quiz
valuepublic AbstractLibrary getLibrary()
AbstractLibrary
valueprotected abstract boolean confirmQuit()
boolean
valuepublic abstract void createQuizSelector()
public final User getUser()
User
valueprotected void validate(User u, AbstractLibrary l)
u
- an User
valuel
- an AbstractLibrary
valueprotected final AbstractLibrary loadLibrary()
AbstractLibrary
valuepublic String getResourceString(String key, String def)
key
- a String
valuedef
- a String
value
String
valuepublic abstract void loadPluglets()
public abstract void setStatus(int pos, String msg)
pos
- an int
valuemsg
- a String
valuepublic abstract void newSetStatus(int pos, String key)
protected abstract void showSplashScreen()
protected abstract void closeSplashScreen()
public final void setUserName(String na)
na
- a String
valuepublic final void setPassword(String na)
na
- a String
valuepublic void registerFeedbackPlugins(Quiz theQuiz)
theQuiz
- a Quiz
valuepublic void processArguments(String[] args)
args
- a String[]
valuepublic final void saveUser()
public final void niceQuit(boolean confirm)
confirm
- a boolean
valuepublic abstract void showIncorrectDialog(String msg)
msg
- a String
value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |