private void xmlWriteDockableWithRelativePosition(Dockable dockable,
			PrintWriter out) throws IOException {
		DockableState state = context.getDockableState(dockable);
		RelativeDockablePosition position = (RelativeDockablePosition) state
				.getPosition();
		boolean isCompound = dockable instanceof CompoundDockable;
		if (isCompound) {
			out.println("<Dockable compound=\"true\">");
		} else {
			out.println("<Dockable>");
		}
		DockKey key = dockable.getDockKey();
		out.println("<Key dockName=\"" + key.getKey() + "\"/>");
		out.println("<RelativePosition x=\"" + position.getX() + "\" y=\""
				+ position.getY() + "\" w=\"" + position.getWidth() + "\" h=\""
				+ position.getHeight() + "\" />");
		if (isCompound) {
			CompoundDockable d = (CompoundDockable) dockable;
			CompoundDockingPanel cdp = (CompoundDockingPanel) d.getComponent(); // no
																				// choice
																				// here
			if (cdp.getComponentCount() > 0) {
				// compound panels cannont have more than one child
				// (split/tab/single)
				Component child = cdp.getComponent(0);
				xmlWriteComponent(child, out);
			}
		}
		out.println("</Dockable>");
	}