public TableConstraints(Map map) {
		OptionTable constraintTable = (map instanceof OptionTable) ? (OptionTable) map : new OptionTable(map);
		gridx = parseXYConstraint(constraintTable.getOption("gridx"));
		gridy = parseXYConstraint(constraintTable.getOption("gridy"));
		String rowSpan = constraintTable.getOption("gridwidth");
		if (rowSpan == null) rowSpan = constraintTable.getOption("rowspan");
		String colSpan = constraintTable.getOption("gridheight");
		if (colSpan == null) colSpan = constraintTable.getOption("colspan");
		gridwidth = parseSpanConstraint(rowSpan);
		gridheight = parseSpanConstraint(colSpan);
		fill = parseFillConstraint(constraintTable.getOption("fill"));
		anchor = parseAnchorConstraint(constraintTable.getOption("anchor"));
		ipadx = constraintTable.getIntOption("ipadx", 0);
		ipady = constraintTable.getIntOption("ipady", 0);
		weightx = constraintTable.getDoubleOption("weightx", 0.0);
		weighty = constraintTable.getDoubleOption("weighty", 0.0);
		insets.left = constraintTable.getIntOption("left", 0);
		insets.right = constraintTable.getIntOption("right", 0);
		insets.top = constraintTable.getIntOption("top", 0);
		insets.bottom = constraintTable.getIntOption("bottom", 0);
		width = constraintTable.getIntOption("width", 0);
		height = constraintTable.getIntOption("height", 0);
		if (gridwidth != 1 && width != 0) {
			throw new ErrorException("TableConstraints: Cannot specify both width and gridwidth");
		}
		if (gridheight != 1 && height != 0) {
			throw new ErrorException("TableConstraints: Cannot specify both height and gridheight");
		}
	}