protected void encodeFields(mxCodec enc, Object obj, Node node)
	{
		// LATER: Use PropertyDescriptors in Introspector.getBeanInfo(clazz)
		// see http://forum.jgraph.com/questions/1424
		Class<?> type = obj.getClass();

		while (type != null)
		{
			Field[] fields = type.getDeclaredFields();

			for (int i = 0; i < fields.length; i++)
			{
				Field f = fields[i];

				if ((f.getModifiers() & Modifier.TRANSIENT) != Modifier.TRANSIENT)
				{
					String fieldname = f.getName();
					Object value = getFieldValue(obj, fieldname);
					encodeValue(enc, obj, fieldname, value, node);
				}
			}

			type = type.getSuperclass();
		}
	}