private double decodeResize(String token) {
		if (token.equals("g") || token.equals("grow")) {
			return DEFAULT_GROW;
		}
		if (token.equals("n") || token.equals("nogrow") || token.equals("none")) {
			return NO_GROW;
		}
		// Must have format: grow(<double>)
		if ((token.startsWith("grow(") || token.startsWith("g("))
				&& token.endsWith(")")) {
			int leftParen = token.indexOf('(');
			int rightParen = token.indexOf(')');
			String substring = token.substring(leftParen + 1, rightParen);
			return Double.parseDouble(substring);
		}
		throw new IllegalArgumentException(
				"The resize argument '"
						+ token
						+ "' is invalid. "
						+ " Must be one of: grow, g, none, n, grow(<double>), g(<double>)");

	}