public String toString() {
		StringBuffer sb = new StringBuffer("<class>" + getClass().getName() + "</class>\n");
		sb.append("<model>" + modelID + "</model>\n");
		sb.append("<type>" + elementID + "</type>\n");
		if (uid != null)
			sb.append("<uid>" + uid + "</uid>\n");
		if (getTitle() != null)
			sb.append("<title>" + XMLCharacterEncoder.encode(getTitle()) + "</title>\n");
		sb.append("<minimum>" + getLowerBound() + "</minimum>\n");
		sb.append("<maximum>" + getUpperBound() + "</maximum>\n");
		sb.append("<nstep>" + getNumberOfTicks() + "</nstep>\n");
		if (getDrawTicks())
			sb.append("<tick>true</tick>\n");
		if (getLockEnergyLevels())
			sb.append("<lockenergylevel>true</lockenergylevel>\n");
		sb.append("<width>" + getWidth() + "</width>\n");
		sb.append("<height>" + (getHeight() - getVerticalMargin() * 2) + "</height>\n");
		if (!getBorderType().equals(BorderManager.BORDER_TYPE[0]))
			sb.append("<border>" + getBorderType() + "</border>\n");
		if (!isOpaque())
			sb.append("<opaque>false</opaque>\n");
		if (!getForeground().equals(Color.black))
			sb.append("<fgcolor>" + Integer.toString(getForeground().getRGB(), 16) + "</fgcolor>");
		if (!getBackground().equals(Color.white))
			sb.append("<bgcolor>" + Integer.toString(getBackground().getRGB(), 16) + "</bgcolor>");
		return sb.toString();
	}