/** * set the value of this <code>AttributeComponent</code> * * @param color the <code>CombinedAttribute</code> to take the color from */ public void setValue( final CombinedAttribute borderWidths, final CombinedAttribute borderColors) { String attr = borderColors.getAttribute(side); // System.out.println("BorderSettings setValue attr='" + attr + "'"); if (attr != null) { bColor.setValue(attr); } attr = borderWidths.getAttribute(side); if (attr != null) { bWidth.setValue(attr); } }
/** * set the value of this <code>AttributeComponent</code> * * @param a the set of attributes possibly having an attribute this component can display * @return true, if the set of attributes had a matching attribute, false if not */ public boolean setValue(final AttributeSet a) { final boolean success = true; ca = new CombinedAttribute(key, a, true); if (++setValueCalls < 2) { originalValue = ca.getAttribute(); } SizeSelectorPanel ssp; for (int i = 0; i < components.size(); i++) { ssp = (SizeSelectorPanel) components.elementAt(i); ssp.setValue(ca.getAttribute(i)); } return success; }