|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--audiojury.action.ProjectRunner
Coordinates the actions when a Project is run by a test subject.
It shows and hides interaction panels, starts and stops playback and collects
results before passing them on.
| Field Summary | |
static int |
MODE_PREVIEW
By default preview mode is off which means the tests will run as programmed (like in the client). |
static int |
MODE_REAL
By default real mode is on, which means the judgements will be performed as programmed. |
static int |
NEXT_JUDGEMENT
Command for gotoRunTest: Goto next judgement. |
static int |
PREV_JUDGEMENT
Command for gotoRunTest: Goto previous judgement. |
static int |
SHOW_INSTRUCTIONS
Command for gotoRunTest: Goto show instructions. |
static int |
SKIP_PRACTICE
Command for gotoRunTest: Skip practice. |
static int |
START_PRACTICE
Command for gotoRunTest: Start practice screen. |
static int |
START_REAL
Command for gotoRunTest: Start real test (no practice). |
| Constructor Summary | |
ProjectRunner(int mode)
Constructor. |
|
| Method Summary | |
int |
getJudgementCount()
Gets the number of Judgement in the current Test. |
javax.swing.JPanel |
getPanel()
Returns the correct panel to show, depending on at which stage the run has come to. |
java.lang.String |
getProjectBase()
Determines the base directory where to look for Projects. |
protected ProjectManager |
getProjectManager()
Gets the ProjectManager currently being used. |
protected ResultManager |
getResultManager()
Gets the ResultManager currently being used. |
int |
getRunmode()
The ProjectRunner may be in either MODE_PREVIEW or MODE_REAL. |
int |
getRunningJudgementEnd()
Gets the index of the last Judgement to run. |
java.util.List |
getRunningJudgements()
Gets a list of the Judgement that will be run in the current Test. |
int |
getRunningJudgementStart()
Gets the index of the first Judgement to run. |
Project |
getRunningProject()
Gets the Project currently being run. |
Test |
getRunningTest()
Gets the Test currently being run. |
int |
getRunningTestIndex()
Gets the index of the currently running Test. |
int |
getTestCount()
Gets the number of Tests in the current Project. |
void |
gotoProjectInstructions()
Jump to showing the project instructions. |
void |
gotoRegistration()
Jump to the step where personal information is collected. |
void |
gotoRunTest(int command)
Jump to the step where tests are run. |
boolean |
hasMoreLeftTests()
Determine wether there are more Tests in the Project to run. |
boolean |
isTestFinished()
Determine wether the current set of Judgement is finished and thus the
current Test is finished. |
void |
previewTest(Project project,
Test test,
FullScreenDialog parent)
Starts preview of a Test. |
void |
runProject(java.lang.String projname,
FullScreenDialog parent)
Starts running a Project. |
void |
saveRegistrationInfo(java.lang.String[] info)
Makes the collected personal information part of the results. |
void |
saveResults()
Saves the project results to disk. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SHOW_INSTRUCTIONS
public static final int START_PRACTICE
public static final int SKIP_PRACTICE
public static final int START_REAL
public static final int NEXT_JUDGEMENT
public static final int PREV_JUDGEMENT
public static int MODE_PREVIEW
public static int MODE_REAL
| Constructor Detail |
public ProjectRunner(int mode)
mode - Which mode to run in, MODE_PREVIEW or MODE_REAL.| Method Detail |
public java.lang.String getProjectBase()
Projects.
Projects can be found.
public void runProject(java.lang.String projname,
FullScreenDialog parent)
throws ProjectOperationException,
NoProjectFoundException,
ProjectEmptyException
Project.
projname - The name of the Projectto run.parent - The parent window.
ProjectOperationException - if an unhandled error occurs.
NoProjectFoundException - if no project could be found with the specified name.
ProjectEmptyException - if the project specified was empty when it shouldn't be.
public void previewTest(Project project,
Test test,
FullScreenDialog parent)
throws TestEmptyException
Test. Used by the administrator part of AudioJury.
project - The project to run.test - The test withing this project to run.parent - The parent window.
TestEmptyException - if the test specified was empty when it shouldn't be.public void saveRegistrationInfo(java.lang.String[] info)
info - An array of values corresponding to the personal attribute labels.
public void saveResults()
throws ResultOperationException
ResultOperationException - if an unhandled error occurs.public int getRunningTestIndex()
Test.
Test.public int getTestCount()
Tests in the current Project.
Tests in the current Project.public int getRunningJudgementStart()
Judgement to run.
Judgement to run.public int getRunningJudgementEnd()
Judgement to run.
Judgement to run.public int getJudgementCount()
Judgement in the current Test.
Judgement in the current Test.public Project getRunningProject()
Project currently being run.
Project object currently being run.public int getRunmode()
ProjectRunner may be in either MODE_PREVIEW or MODE_REAL.
public Test getRunningTest()
Test currently being run.
Test currently being run.public java.util.List getRunningJudgements()
Judgement that will be run in the current Test.
Judgement that will be run in the current Test.public void gotoProjectInstructions()
public void gotoRegistration()
public void gotoRunTest(int command)
command - The command (or rather step) to execute in test.public boolean isTestFinished()
Judgement is finished and thus the
current Test is finished.
Test has been completed, false otherwise.public boolean hasMoreLeftTests()
Tests in the Project to run.
Tests left, false otherwise.public javax.swing.JPanel getPanel()
protected ProjectManager getProjectManager()
ProjectManager currently being used.
ProjectManager.protected ResultManager getResultManager()
ResultManager currently being used.
ResultManager.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||