*
* @param g2 The graphics object used for painting.
* @param p The position to paint the triangle.
**/
public void draw(Graphics2D g2, Point p) {
SimpleShape shape = m_shapeRef.get();
// If this is a proxy shape, use it to draw the shape.
if (shape != null) {
// Draw the shape.
shape.draw(g2, p);
// If everything was successful, then simply return.
return;
}
// If the proxied shape could not be drawn for any reason or if