|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.feedback.FeedbackObject
public class FeedbackObject
Indepented object for storing adequat feedback.
| Field Summary | |
|---|---|
static int |
CORRECT
Defines that the operation is correct |
static int |
INCORRECT
Defines that the operation is incorrect |
static int |
INCORRECT_MISSING
Defines that this object is associated to the failure "missing-suboperations", what means that all performed operations are correct, but there are missing some suboperations to complete the actual operation |
static int |
UNKNOWN
Defines an unknown correctness |
| Constructor Summary | |
|---|---|
FeedbackObject()
Create a FeedbackObject |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
genMessage(java.lang.String img1,
java.lang.String txt1,
java.lang.String img2,
java.lang.String txt2)
Generates a 2x2 table-HTML-Message from the given parameters |
int |
getCorrectness()
Gets the correctness |
SubOperation |
getCorrectSubOperation()
Gets the correct suboperation the feedback belongs to |
java.util.Vector |
getMessages()
Gets the messages |
java.lang.String |
getNextMessage()
Gets the next message. |
Operation |
getOperation()
Gets the operation the feedback belongs to |
int |
getOpNr()
Gets the Operation-Number |
java.lang.String |
getPrevMessage()
Gets the previous message. |
SubOperation |
getSubOperation()
|
int |
getSubOpNr()
Gets the SubOperation-Number |
void |
load(java.util.HashMap hm)
Loads this FeedbackObject with the parameters defined in the deliverd HashMap-representation |
java.util.HashMap |
save()
Converts this FeedbackObject in a HashMap-representation for saving-purposes. |
void |
setCorrectness(int c)
Sets the correctness |
void |
setCorrectSubOperation(SubOperation subop)
Sets the correct suboperation the feedback belongs to |
void |
setLocationShow(boolean b)
Sets that when getNextMessage or getPrevMessage is called, that the returned HTML-message contains information about the position of the failure. |
void |
setMessagePosition(int p)
Sets the current message-position inside the messages that are associated to this FeedbackObject |
void |
setMessages(java.util.Vector m)
Sets the messages |
void |
setOperation(Operation op)
Sets the operation the feedback belongs to |
void |
setOpNr(int n)
Sets the Operation-Number inside the exercise |
void |
setSubOperation(SubOperation subop)
|
void |
setSubOpNr(int n)
Sets the SubOperation-Number inside the operation, the suboperation belongs to |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int CORRECT
public static final int INCORRECT
public static final int INCORRECT_MISSING
| Constructor Detail |
|---|
public FeedbackObject()
| Method Detail |
|---|
public void setMessages(java.util.Vector m)
m - Vector of messagespublic java.util.Vector getMessages()
public void setOperation(Operation op)
op - Operationpublic Operation getOperation()
public void setSubOperation(SubOperation subop)
public SubOperation getSubOperation()
public void setCorrectSubOperation(SubOperation subop)
subop - SubOperationpublic SubOperation getCorrectSubOperation()
public void setOpNr(int n)
n - Operation-Numberpublic int getOpNr()
public void setSubOpNr(int n)
n - SubOperation-Numberpublic int getSubOpNr()
public void setCorrectness(int c)
c - correctness-IDUNKNOWN,
CORRECT,
INCORRECT,
INCORRECT_MISSINGpublic int getCorrectness()
setCorrectness(int)public void setMessagePosition(int p)
p - message-positionpublic java.lang.String getNextMessage()
public java.lang.String getPrevMessage()
public void setLocationShow(boolean b)
b - true for displaying the location, false otherwise
public java.lang.String genMessage(java.lang.String img1,
java.lang.String txt1,
java.lang.String img2,
java.lang.String txt2)
img1 - The image that should be displayed in the upper-left-cell of the messagetxt1 - The HTML-text that should be displayed in the upper-right-cell of the messageimg2 - The image that should be displayed in the lower-left-cell of the messagetxt2 - The HTML-text that should be displayed in the upper-right-cell of the message
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparatorpublic boolean equals(java.lang.Object o)
equals in interface java.util.Comparatorequals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.util.HashMap save()
public void load(java.util.HashMap hm)
hm - HashMap-representation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||