@Override
    public void visit(IRenderingElement element) {
        Color savedColor = this.graphics.getColor();
        if (element instanceof ElementGroup)
            visit((ElementGroup) element);
        else if (element instanceof WedgeLineElement)
            visit((WedgeLineElement) element);
        else if (element instanceof LineElement)
            visit((LineElement) element);
        else if (element instanceof OvalElement)
            visit((OvalElement) element);
        else if (element instanceof TextGroupElement)
            visit((TextGroupElement) element);
        else if (element instanceof AtomSymbolElement)
            visit((AtomSymbolElement) element);
        else if (element instanceof TextElement)
            visit((TextElement) element);
        else if (element instanceof RectangleElement)
            visit((RectangleElement) element);
        else if (element instanceof PathElement)
            visit((PathElement) element);
        else if (element instanceof GeneralPath)
            visit((GeneralPath) element);
        else if (element instanceof ArrowElement)
            visit((ArrowElement) element);
        else if (element instanceof Bounds) {
            visit(((Bounds) element).root());
        } else if (element instanceof MarkedElement) {
            visit(((MarkedElement) element).element());
        } else
            System.err.println("Visitor method for " + element.getClass().getName() + " is not implemented");
        this.graphics.setColor(savedColor);
    }
@ Override public void visit ( IRenderingElement element ) { Color savedColor = this . graphics . getColor ( ) ; if ( element instanceof ElementGroup ) visit ( ( ElementGroup ) element ) ; else if ( element instanceof WedgeLineElement ) visit ( ( WedgeLineElement ) element ) ; else if ( element instanceof LineElement ) visit ( ( LineElement ) element ) ; else if ( element instanceof OvalElement ) visit ( ( OvalElement ) element ) ; else if ( element instanceof TextGroupElement ) visit ( ( TextGroupElement ) element ) ; else if ( element instanceof AtomSymbolElement ) visit ( ( AtomSymbolElement ) element ) ; else if ( element instanceof TextElement ) visit ( ( TextElement ) element ) ; else if ( element instanceof RectangleElement ) visit ( ( RectangleElement ) element ) ; else if ( element instanceof PathElement ) visit ( ( PathElement ) element ) ; else if ( element instanceof GeneralPath ) visit ( ( GeneralPath ) element ) ; else if ( element instanceof ArrowElement ) visit ( ( ArrowElement ) element ) ; else if ( element instanceof Bounds ) { visit ( ( ( Bounds ) element ) . root ( ) ) ; } else if ( element instanceof MarkedElement ) { visit ( ( ( MarkedElement ) element ) . element ( ) ) ; } else System . err . println ( "Visitor method for " + element . getClass ( ) . getName ( ) + " is not implemented" ) ; this . graphics . setColor ( savedColor ) ; }
{@inheritDoc}