@Test public void testRender() { final SvgDataUriGlyph glyph = SvgDataUriGlyph.Builder.build(uri); tested.render(glyph, 100, 200); verify(viewSupplier, times(1)).get(); verify(view, times(1)).setDOMContent(eq(SVG_CONTENT), eq(100), eq(200)); }
@Override public IsElement render(final SvgDataUriGlyph glyph, final double width, final double height) { final String content = svgDataUriUtil .generate(glyph.getSvg(), glyph.getDefs(), glyph.getValidUseRefIds()); final ImageElementRendererView view = viewInstanceSupplier.get(); return view.setDOMContent(content, (int) width, (int) height); }
SvgElementGlyphRenderer implements DOMGlyphRenderer<SvgDataUriGlyph> { @Override public IsElement render(final SvgDataUriGlyph glyph, final double width, final double height) { final String content = svgDataUriUtil .generate(glyph.getSvg(), glyph.getDefs(), glyph.getValidUseRefIds()); final ImageElementRendererView view = viewInstanceSupplier.get(); return view.setDOMContent(content, (int) width, (int) height); } }
SvgElementGlyphRenderer implements DOMGlyphRenderer<SvgDataUriGlyph> { @Override public IsElement render(final SvgDataUriGlyph glyph, final double width, final double height) { final String content = svgDataUriUtil .generate(glyph.getSvg(), glyph.getDefs(), glyph.getValidUseRefIds()); final ImageElementRendererView view = viewInstanceSupplier.get(); return view.setDOMContent(content, (int) width, (int) height); } protected  SvgElementGlyphRenderer(); @Inject  SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                                   final @Any ManagedInstance<ImageElementRendererView> viewInstances);   SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                            final Supplier<ImageElementRendererView> viewInstanceSupplier,
                            final Command viewInstancesDestroyer); }
SvgElementGlyphRenderer implements DOMGlyphRenderer<SvgDataUriGlyph> { @Override public IsElement render(final SvgDataUriGlyph glyph, final double width, final double height) { final String content = svgDataUriUtil .generate(glyph.getSvg(), glyph.getDefs(), glyph.getValidUseRefIds()); final ImageElementRendererView view = viewInstanceSupplier.get(); return view.setDOMContent(content, (int) width, (int) height); } protected  SvgElementGlyphRenderer(); @Inject  SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                                   final @Any ManagedInstance<ImageElementRendererView> viewInstances);   SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                            final Supplier<ImageElementRendererView> viewInstanceSupplier,
                            final Command viewInstancesDestroyer); @Override Class<SvgDataUriGlyph> getGlyphType(); @Override IsElement render(final SvgDataUriGlyph glyph,
                            final double width,
                            final double height); @PreDestroy void destroy(); }
SvgElementGlyphRenderer implements DOMGlyphRenderer<SvgDataUriGlyph> { @Override public IsElement render(final SvgDataUriGlyph glyph, final double width, final double height) { final String content = svgDataUriUtil .generate(glyph.getSvg(), glyph.getDefs(), glyph.getValidUseRefIds()); final ImageElementRendererView view = viewInstanceSupplier.get(); return view.setDOMContent(content, (int) width, (int) height); } protected  SvgElementGlyphRenderer(); @Inject  SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                                   final @Any ManagedInstance<ImageElementRendererView> viewInstances);   SvgElementGlyphRenderer(final SvgDataUriGenerator svgDataUriUtil,
                            final Supplier<ImageElementRendererView> viewInstanceSupplier,
                            final Command viewInstancesDestroyer); @Override Class<SvgDataUriGlyph> getGlyphType(); @Override IsElement render(final SvgDataUriGlyph glyph,
                            final double width,
                            final double height); @PreDestroy void destroy();  }