All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.logic.SessionSubjectGroup

java.lang.Object
   |
   +----guinea.logic.SessionSubjectGroup

public class SessionSubjectGroup
extends Object

Variable Index

· currentItem
Current test item the group is processing.
· sessionID
Session ID of this group.
· subjects
Subjects in this group.
· test
The test that this group is associated with.

Constructor Index

· SessionSubjectGroup()
· SessionSubjectGroup(Test)

Method Index

· addSessionSubject(SessionSubject)
Add a session subject to the group.
· close()
Close the UI window.
· closeAll()
· dispose()
Dispose of the UI when it is no more used.
· disposeAll()
· getActiveSessionSubjects()
Get all active subjects in this group as an array.
· getAnswer(String)
· getCurrentItem()
· getNumSubjects()
· getParameter(String)
· getParameter(String, Object)
· getSessionID()
· getSessionSubjects()
Get subjects in this group as an array.
· getTest()
· hasTest()
· open()
Open the UI window making it visible.
· openAll()
· removeAllSessionSubjects()
Remove all subjects from this group.
· removeCurrentItem()
· removeSessionSubject(SessionSubject)
Remove a session subject from the subject.
· reset()
Resets the UI to default state.
· resetAll()
· resetTimeout()
Reset the indicator to default (inactive) state.
· resetTimeoutAll()
· setActive(boolean)
· setControlsEnabled(boolean)
Enable or disable all control components.
· setControlsEnabledAll(boolean)
· setControlValue(SessionSubject[], String, Object)
Set the (initial) control value of the controller.
· setControlValue(String, Object)
· setControlValueAll(String, Object)
· setCurrentItem(Item)
· setDoneEnabled(boolean)
Enable or disable the DONE-button that the subject uses to indicate that he/she has completed grading (or whatever) the current test item.
· setDoneEnabledAll(boolean)
· setEnabled(boolean)
Enable or disable all subject UI components.
· setEnabledAll(boolean)
· setItemStatus(int)
· setMonitorValue(String, Object)
Set the value of the monitored variable.
· setMonitorValueAll(String, Object)
· setQuestionAnswer(String, Object)
· setQuestionAnswerAll(String, Object)
· setQuestionsEnabled(boolean)
Enable or disable all question or answer components.
· setQuestionsEnabledAll(boolean)
· setSessionID(String)
· setTest(Test)
· setTimeoutTimes(int)
Set the timeout time.
· setTimeoutTimes(int, int)
Set the timeout time and warning time of the indicator.
· setTimeoutTimesAll(int)
· setTimeoutTimesAll(int, int)
· setTimeoutVisible(boolean)
· setTimeoutVisibleAll(boolean)
· startTimeoutWarning()
Start the timeout warning and the countdown display.
· startTimeoutWarningAll()
· subjectChanged(SessionSubject)
Inform group about a change in a subject's parameters.

Variables

· sessionID
 protected String sessionID
Session ID of this group.

· test
 protected Test test
The test that this group is associated with.

· subjects
 protected Vector subjects
Subjects in this group. Vector elements are instaces of SessionSubject class.

See Also:
SessionSubject
· currentItem
 protected Item currentItem
Current test item the group is processing.

Constructors

· SessionSubjectGroup
 public SessionSubjectGroup()
· SessionSubjectGroup
 public SessionSubjectGroup(Test test)

Methods

· getSessionSubjects
 public synchronized SessionSubject[] getSessionSubjects()
Get subjects in this group as an array.

Returns:
An array of all session subjects in this group. Do not modify the returned array.
· getActiveSessionSubjects
 public synchronized SessionSubject[] getActiveSessionSubjects()
Get all active subjects in this group as an array.

Returns:
An array of active session subjects in this group. Do not modify the returned array.
· addSessionSubject
 public synchronized void addSessionSubject(SessionSubject ss)
Add a session subject to the group. This group is also set as the session subject's group and group's test as the subject's test (if set).

Parameters:
ss - A subject to add.
· removeSessionSubject
 public synchronized boolean removeSessionSubject(SessionSubject ss)
Remove a session subject from the subject. Subject's group is also reset (to null).

Parameters:
ss - Subject to remove from this group.
Returns:
True if subject was removed from the group (subject was included in the group) or false is subject was not removed (not included in the group).
· removeAllSessionSubjects
 public synchronized void removeAllSessionSubjects()
Remove all subjects from this group. The group of all the subjects is also reset (to null).

· subjectChanged
 public synchronized void subjectChanged(SessionSubject s)
Inform group about a change in a subject's parameters.

Parameters:
s - The session subject that has changed in some way.
· setTest
 public void setTest(Test test)
· getTest
 public Test getTest()
· hasTest
 public boolean hasTest()
· setSessionID
 public void setSessionID(String id)
· getSessionID
 public String getSessionID()
· getNumSubjects
 public int getNumSubjects()
· setCurrentItem
 public void setCurrentItem(Item item)
· getCurrentItem
 public Item getCurrentItem()
· removeCurrentItem
 public Item removeCurrentItem()
· getAnswer
 public Object getAnswer(String qid)
· getParameter
 public Object getParameter(String pname)
· getParameter
 public Object getParameter(String pname,
                            Object def)
· setActive
 public void setActive(boolean active)
· setItemStatus
 public void setItemStatus(int status)
· reset
 public void reset()
Resets the UI to default state. Resets all controls, questions, monitors and other buttons (Done-button).

· resetAll
 public void resetAll()
· open
 public void open()
Open the UI window making it visible. To close it (making it invisible), call close.

See Also:
close
· openAll
 public void openAll()
· close
 public void close()
Close the UI window. Closing the UI only makes it invisible. To make it visible again, call open() again. To get totally rid of the UI, use dispose().

See Also:
dispose, open
· closeAll
 public void closeAll()
· dispose
 public void dispose()
Dispose of the UI when it is no more used. Frees all resources that are used by the UI, etc. Do not try to use the UI any more after it has been disposed, results are unpredictable.

· disposeAll
 public void disposeAll()
· setEnabled
 public void setEnabled(boolean enable)
Enable or disable all subject UI components.

· setEnabledAll
 public void setEnabledAll(boolean enable)
· setControlsEnabled
 public void setControlsEnabled(boolean enable)
Enable or disable all control components.

· setControlsEnabledAll
 public void setControlsEnabledAll(boolean enable)
· setQuestionsEnabled
 public void setQuestionsEnabled(boolean enable)
Enable or disable all question or answer components.

· setQuestionsEnabledAll
 public void setQuestionsEnabledAll(boolean enable)
· setDoneEnabled
 public void setDoneEnabled(boolean enable)
Enable or disable the DONE-button that the subject uses to indicate that he/she has completed grading (or whatever) the current test item.

· setDoneEnabledAll
 public void setDoneEnabledAll(boolean enable)
· setQuestionAnswer
 public void setQuestionAnswer(String questionID,
                               Object answer)
· setQuestionAnswerAll
 public void setQuestionAnswerAll(String questionID,
                                  Object answer)
· setControlValue
 public void setControlValue(String controlID,
                             Object value)
· setControlValueAll
 public void setControlValueAll(String controlID,
                                Object value)
· setControlValue
 public void setControlValue(SessionSubject s[],
                             String controlID,
                             Object value)
Set the (initial) control value of the controller.

Parameters:
controlID - The ID of the controller component.
value - The value of the controlled variable.
· setMonitorValue
 public void setMonitorValue(String monitorID,
                             Object value)
Set the value of the monitored variable.

Parameters:
monitorID - The ID of the monitor component.
value - The value of the monitored variable.
· setMonitorValueAll
 public void setMonitorValueAll(String monitorID,
                                Object value)
· setTimeoutVisible
 public void setTimeoutVisible(boolean visible)
· setTimeoutVisibleAll
 public void setTimeoutVisibleAll(boolean visible)
· setTimeoutTimes
 public void setTimeoutTimes(int timeoutTime,
                             int warningTime)
Set the timeout time and warning time of the indicator.

Parameters:
timeoutTime - How much time there is to answer before the timeout expires. The timeout is in milliseconds.
warningTime - When to show that time is about to run out. It is the number of milliseconds before the timeout.
See Also:
startTimeoutWarning
· setTimeoutTimesAll
 public void setTimeoutTimesAll(int timeoutTime,
                                int warningTime)
· setTimeoutTimes
 public void setTimeoutTimes(int timeoutTime)
Set the timeout time. No warning is shown before going directly to timeout.

Parameters:
timeoutTime - How much time there is to answer before the timeout expires. The timeout is in milliseconds.
· setTimeoutTimesAll
 public void setTimeoutTimesAll(int timeoutTime)
· startTimeoutWarning
 public void startTimeoutWarning()
Start the timeout warning and the countdown display.

· startTimeoutWarningAll
 public void startTimeoutWarningAll()
· resetTimeout
 public void resetTimeout()
Reset the indicator to default (inactive) state.

· resetTimeoutAll
 public void resetTimeoutAll()

All Packages  Class Hierarchy  This Package  Previous  Next  Index