QChangeEventpublic class QChangeEvent extends AWTEvent A Q sends a QChangeEvent to its observers when its question is changed. |
Fields Summary |
---|
public static final int | CHANGE_QUESTION_TEXT | public static final int | CHANGE_ANSWER_NUMBER | public static final int | CHANGE_ANSWER_TEXT | private int | ansNumber | private String | newText | Q | q |
Constructors Summary |
---|
public QChangeEvent(Q qq, int type, int aNum, String txt)Construct a given QChangeEvent
super(qq, type);
q = qq;
ansNumber = aNum;
newText = txt;
|
Methods Summary |
---|
private java.lang.String | fmt(int type)
switch(type) {
case CHANGE_QUESTION_TEXT:
return "CHANGE_QUESTION_TEXT";
case CHANGE_ANSWER_NUMBER:
return "CHANGE_ANSWER_NUMBER";
case CHANGE_ANSWER_TEXT:
return "CHANGE_ANSWER_TEXT";
default:
return "UNKNOWN CHANGE EVENT TYPE!!";
}
| public int | getAnsNumber()
return ansNumber;
| public java.lang.String | getText()
return newText;
| public java.lang.String | toString()
return "QChangeEvent[Question" + q + "; type " + fmt(getID()) + "]";
|
|