266a267,268 > * > * @deprecated use getAttribute(FigureAttributeConstant) instead 269c271,280 < if (name.equals("FrameColor")) { --- > return getAttribute(FigureAttributeConstant.getConstant(name)); > } > > /** > * Gets the attribute with the given name. > * PolyLineFigure maps "ArrowMode"to a > * line decoration. > */ > public Object getAttribute(FigureAttributeConstant attributeConstant) { > if (attributeConstant.equals(FigureAttributeConstant.FRAME_COLOR)) { 272c283 < else if (name.equals("ArrowMode")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.ARROW_MODE)) { 282c293 < return super.getAttribute(name); --- > return super.getAttribute(attributeConstant); 288a300,301 > * > * @deprecated use setAttribute(FigureAttributeConstant, Object) instead 291c304,313 < if (name.equals("FrameColor")) { --- > setAttribute(FigureAttributeConstant.getConstant(name), value); > } > > /** > * Sets the attribute with the given name. > * PolyLineFigure interprets "ArrowMode"to set > * the line decoration. > */ > public void setAttribute(FigureAttributeConstant attributeConstant, Object value) { > if (attributeConstant.equals(FigureAttributeConstant.FRAME_COLOR)) { 295c317 < else if (name.equals("ArrowMode")) { --- > else if (attributeConstant.equals(FigureAttributeConstant.ARROW_MODE.getName())) { 315c337 < super.setAttribute(name, value); --- > super.setAttribute(attributeConstant, value); 360a383,393 > > /** > * Hook method to change the rectangle that will be invalidated > */ > protected Rectangle invalidateRectangle(Rectangle r) { > // SF-bug id: 533953: provide this method to customize invalidated rectangle > Rectangle parentR = super.invalidateRectangle(r); > parentR.add(getStartDecoration().displayBox()); > parentR.add(getEndDecoration().displayBox()); > return parentR; > }