private Rectangle computeCellBounds(Rectangle enclosure, Dimension psize, TableConstraints tc) {
		int x = enclosure.x;
		int y = enclosure.y;
		int width = enclosure.width;
		int height = enclosure.height;
		if (tc.fill == TableConstraints.NONE || tc.fill == TableConstraints.VERTICAL) {
			width = psize.width;
		}
		if (tc.fill == TableConstraints.NONE || tc.fill == TableConstraints.HORIZONTAL) {
			height = psize.height;
		}
		if (width != enclosure.width) {
			switch (tc.anchor) {
			  case TableConstraints.NORTH: case TableConstraints.CENTER: case TableConstraints.SOUTH:
				x += (enclosure.width - width) / 2;
				break;
			  case TableConstraints.NORTHEAST: case TableConstraints.EAST: case TableConstraints.SOUTHEAST:
				x += enclosure.width - width;
				break;
			}
		}
		if (height != enclosure.height) {
			switch (tc.anchor) {
			  case TableConstraints.WEST: case TableConstraints.CENTER: case TableConstraints.EAST:
				y += (enclosure.height - height) / 2;
				break;
			  case TableConstraints.SOUTHWEST: case TableConstraints.SOUTH: case TableConstraints.SOUTHEAST:
				y += enclosure.height - height;
				break;
			}
		}
		return new Rectangle(x, y, width, height);
	}