61,61c61,61 < 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) { 138a149,149 > if (attributeConstant.equals(FigureAttributeConstant.FONT_SIZE)) { 139,139d148 < if (name.equals("FontSize")) { 141a152,152 > if (attributeConstant.equals(FigureAttributeConstant.FONT_STYLE)) { 142,142d151 < if (name.equals("FontStyle")) { 144a155,155 > if (attributeConstant.equals(FigureAttributeConstant.FONT_NAME)) { 145,145d154 < if (name.equals("FontName")) { 148,148c158,158 < 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) { 156a177,177 > if (attributeConstant.equals(FigureAttributeConstant.FONT_SIZE)) { 157,157d176 < if (name.equals("FontSize")) { 161,161c181,181 < else if (name.equals("FontStyle")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.FONT_STYLE)) { 172,172c192,192 < else if (name.equals("FontName")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.FONT_NAME)) { 177,177c197,197 < super.setAttribute(name, value); --- > super.setAttribute(attributeConstant, value); 214,214c234,234 < g.setColor((Color) getAttribute("TextColor")); --- > g.setColor((Color) getAttribute(FigureAttributeConstant.TEXT_COLOR)); 219,219c239,239 < private Dimension textExtent() { --- > protected Dimension textExtent() { 230,230c250,250 < private void markDirty() { --- > protected void markDirty() {