/** * draw - overrides parent method * * <p>See implementation comments in the AEllipse class. */ public void draw(java.awt.Graphics2D brush2D) { Color savedColor = brush2D.getColor(); brush2D.setColor(_borderColor); java.awt.Stroke savedStroke = brush2D.getStroke(); brush2D.setStroke(new java.awt.BasicStroke(_lineWidth)); brush2D.draw(this); // "this" class, ARoundRectangle, is subclass // of java.awt.geom.Rectangle2D.Double // A Graphics2D object knows how to draw the // the border of this kind of object. brush2D.setStroke(savedStroke); brush2D.setColor(savedColor); }