/** Update any cached values that come from attributes. */ protected void setPropertiesFromAttributes() { // update attributes StyleSheet sheet = getStyleSheet(); attr = sheet.getViewAttributes(this); // Reset the painter painter = sheet.getBoxPainter(attr); if (attr != null) { setInsets( (short) painter.getInset(TOP, this), (short) painter.getInset(LEFT, this), (short) painter.getInset(BOTTOM, this), (short) painter.getInset(RIGHT, this)); } // Get the width/height cssWidth = (CSS.LengthValue) attr.getAttribute(CSS.Attribute.WIDTH); cssHeight = (CSS.LengthValue) attr.getAttribute(CSS.Attribute.HEIGHT); }