public void setColor(Color color) {
        String hex = null;
        Double opacity = null;
        if (color != null) {
            hex = color.getColorHexShorthand();
            opacity = new Double(color.getOpacity());
        }
        setColor(hex);
        setOpacity(opacity);
    }
public void setColor ( Color color ) { String hex = null ; Double opacity = null ; if ( color != null ) { hex = color . getColorHexShorthand ( ) ; opacity = new Double ( color . getOpacity ( ) ) ; } setColor ( hex ) ; setOpacity ( opacity ) ; }
Set the color

@param color color