61c61 < setAttribute("FillColor", ColorMap.color("None")); --- > setAttribute(FigureAttributeConstant.FILL_COLOR.getName(), ColorMap.color("None")); 135a136,137 > * > * @deprecated use getAttribute(FigureAttributeConstant) instead 137a140,147 > return getAttribute(FigureAttributeConstant.getConstant(name)); > } > > /** > * A text figure understands the "FontSize", "FontStyle", and "FontName" > * attributes. > */ > public Object getAttribute(FigureAttributeConstant attributeConstant) { 139c149 < if (name.equals("FontSize")) { --- > if (attributeConstant.equals(FigureAttributeConstant.FONT_SIZE)) { 142c152 < if (name.equals("FontStyle")) { --- > if (attributeConstant.equals(FigureAttributeConstant.FONT_STYLE)) { 145c155 < if (name.equals("FontName")) { --- > if (attributeConstant.equals(FigureAttributeConstant.FONT_NAME)) { 148c158 < return super.getAttribute(name); --- > return super.getAttribute(attributeConstant); 153a164,165 > * > * @deprecated use setAttribute(FigureAttributeConstant, Object) instead 155a168,175 > setAttribute(FigureAttributeConstant.getConstant(name), value); > } > > /** > * A text figure understands the "FontSize", "FontStyle", and "FontName" > * attributes. > */ > public void setAttribute(FigureAttributeConstant attributeConstant, Object value) { 157c177 < if (name.equals("FontSize")) { --- > if (attributeConstant.equals(FigureAttributeConstant.FONT_SIZE)) { 161c181 < else if (name.equals("FontStyle")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.FONT_STYLE)) { 172c192 < else if (name.equals("FontName")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.FONT_NAME)) { 177c197 < super.setAttribute(name, value); --- > super.setAttribute(attributeConstant, value); 214c234 < g.setColor((Color) getAttribute("TextColor")); --- > g.setColor((Color) getAttribute(FigureAttributeConstant.TEXT_COLOR)); 219c239 < private Dimension textExtent() { --- > protected Dimension textExtent() { 230c250 < private void markDirty() { --- > protected void markDirty() {