org.problets.lib.log
Class LogModel

java.lang.Object
  extended by org.problets.lib.log.LogModel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener

public class LogModel
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.MouseListener

To hold the logged data Constructor creates the log ActionPerformed makes entries in the log Only CodeModel (thru CodeView) and TutorModel directly add to the log addToLog(String) is provided just in case, although it is not expected to be used extensively recordLog() will either save the log in a file (if application) or send it to the user (if applet) LogView displays the log

Author:
Amruth Kumar

Field Summary
static java.lang.String ACTUAL_ANSWER_LINE
           
static java.lang.String DIAGNOSIS_LINE
           
static java.lang.String GRADE_LINE
           
static java.lang.String LEARN_OBJ_SUMMARY_HEADER
           
static java.lang.String POSTTEST_STRING
           
static java.lang.String PRACTICE_STRING
           
static java.lang.String PRETEST_STRING
           
static java.lang.String PROBLEM_LINE
           
static java.lang.String PROBLEM_NUMBER_LINE
           
static java.lang.String PROBLEM_STAGE
           
static java.lang.String REFLECTION_LINE
           
static java.lang.String SEPARATOR
           
static java.lang.String STUDENT_ANSWER_LINE
           
static java.lang.String TEMPLATE_LINE
           
static java.lang.String TIME_LINE
           
static java.lang.String TIME_SPENT_LINE
           
 
Constructor Summary
LogModel(CommunicationManager inCommunicationManager)
          Allocates space for the log
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
 void addToLog(java.lang.String s, int type)
          Adds a local copy of the string to the log
 void addToLog(java.util.Vector data, int type)
          Method to enter in aggregate into the log
 void clearLog()
          Method to remove all entries from the log Expected to be used when changing modes
 java.util.Vector getLog()
          Returns a reference to the entire log
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void registerLog()
          Method to register the log:
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final java.lang.String SEPARATOR
See Also:
Constant Field Values

PROBLEM_NUMBER_LINE

public static final java.lang.String PROBLEM_NUMBER_LINE
See Also:
Constant Field Values

TEMPLATE_LINE

public static final java.lang.String TEMPLATE_LINE
See Also:
Constant Field Values

PROBLEM_LINE

public static final java.lang.String PROBLEM_LINE
See Also:
Constant Field Values

ACTUAL_ANSWER_LINE

public static final java.lang.String ACTUAL_ANSWER_LINE
See Also:
Constant Field Values

STUDENT_ANSWER_LINE

public static final java.lang.String STUDENT_ANSWER_LINE
See Also:
Constant Field Values

GRADE_LINE

public static final java.lang.String GRADE_LINE
See Also:
Constant Field Values

DIAGNOSIS_LINE

public static final java.lang.String DIAGNOSIS_LINE
See Also:
Constant Field Values

TIME_LINE

public static final java.lang.String TIME_LINE
See Also:
Constant Field Values

REFLECTION_LINE

public static final java.lang.String REFLECTION_LINE
See Also:
Constant Field Values

LEARN_OBJ_SUMMARY_HEADER

public static final java.lang.String LEARN_OBJ_SUMMARY_HEADER
See Also:
Constant Field Values

PROBLEM_STAGE

public static final java.lang.String PROBLEM_STAGE
See Also:
Constant Field Values

PRETEST_STRING

public static final java.lang.String PRETEST_STRING
See Also:
Constant Field Values

PRACTICE_STRING

public static final java.lang.String PRACTICE_STRING
See Also:
Constant Field Values

POSTTEST_STRING

public static final java.lang.String POSTTEST_STRING
See Also:
Constant Field Values

TIME_SPENT_LINE

public static final java.lang.String TIME_SPENT_LINE
See Also:
Constant Field Values
Constructor Detail

LogModel

public LogModel(CommunicationManager inCommunicationManager)
Allocates space for the log

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

getLog

public java.util.Vector getLog()
Returns a reference to the entire log


addToLog

public void addToLog(java.lang.String s,
                     int type)
Adds a local copy of the string to the log


addToLog

public void addToLog(java.util.Vector data,
                     int type)
Method to enter in aggregate into the log


clearLog

public void clearLog()
Method to remove all entries from the log Expected to be used when changing modes


registerLog

public void registerLog()
Method to register the log: