public String toString() {
		StringBuffer sb = new StringBuffer("<class>" + getClass().getName() + "</class>\n");
		if (uid != null)
			sb.append("<uid>" + uid + "</uid>\n");
		if (!layout.equals(BorderLayout.NORTH))
			sb.append("<layout>" + layout + "</layout>\n");
		sb.append("<single>" + getSingleSelection() + "</single>\n");
		sb.append("<row>" + getChoiceCount() + "</row>\n");
		sb.append("<width>" + getWidth() + "</width>\n");
		sb.append("<height>" + getHeight() + "</height>\n");
		sb.append("<title>" + XMLCharacterEncoder.encode(questionBody.getText()) + "</title>\n");
		if (hasCheckAnswerButton())
			sb.append("<submit>true</submit>\n");
		if (hasClearAnswerButton())
			sb.append("<clear>true</clear>\n");
		sb.append(choicesToString());
		sb.append("<answer>" + answerToString() + "</answer>\n");
		if (isOpaque()) {
			sb.append("<bgcolor>" + Integer.toString(getBackground().getRGB(), 16) + "</bgcolor>\n");
		}
		else {
			sb.append("<opaque>false</opaque>\n");
		}
		if (!getBorderType().equals(BorderManager.BORDER_TYPE[0])) {
			sb.append("<border>" + getBorderType() + "</border>\n");
		}
		String s = scriptsToString();
		if (s != null && !s.trim().equals("")) {
			sb.append("<script>" + XMLCharacterEncoder.encode(s) + "</script>\n");
		}
		return sb.toString();
	}