private RenderableObject generateRectangle(Scanner inFile) {
		Point s = null, e = null, loc = null;
		int thickness = 0;
		Color c = null;
		String current = inFile.next();
		while (inFile.hasNext()
				&& !(isCloseTag(current) && parseTag(current) == LegalTag.Object)) {
			if (isOpenTag(current)) {
				switch (parseTag(current)) {
				case Start:
					s = new Point(inFile.nextInt(), inFile.nextInt());
					break;
				case End:
					e = new Point(inFile.nextInt(), inFile.nextInt());
					break;
				case Color:
					c = new Color(inFile.nextInt(), inFile.nextInt(),
							inFile.nextInt());
					break;
				case Location:
					loc = new Point(inFile.nextInt(), inFile.nextInt());
					break;
				case Thickness:
					thickness = inFile.nextInt();
					break;
				default:
					break;
				}
			}
			current = inFile.next();
		}

		Rectangle rect = new Rectangle(s, e, thickness, c);
		rect.setLocation(loc);

		return rect;
	}