/** * Sets the preferred height via an string. Expects an dimension/unit compount i.e. * "120px" or "80%" but will assume px by default. * @param height A preferred height. */ public void setHeight(String height) { this.heightInt = extractNumericValue(height); this.heightUnit = extractUnit(height); }
/** * Sets the preferred width via an string. Expects an dimension/unit compount i.e. * "120px" or "80%" but will assume px by default. * @param width A preferred witdth. */ public void setWidth(String width) { this.widthInt = extractNumericValue(width); this.widthUnit = extractUnit(width); }