class ImageStripDOMGlyphRenderer implements DOMGlyphRenderer<ImageStripGlyph> {

    @Override
    public IsElement render(final ImageStripGlyph glyph,
                            final double width,
                            final double height) {
        final ImageStrip strip = stripRegistry.get(glyph.getStripType());
        final int index = glyph.getIndex();
        final boolean isHorizontal = ImageStrip.Orientation.HORIZONTAL.equals(strip.getOrientation());
        final int clipX = isHorizontal ? (strip.getWide() + strip.getPadding()) * index : 0;
        final int clipY = !isHorizontal ? (strip.getHigh() + strip.getPadding()) * index : 0;
        final WidgetElementRendererView view = views.get();
        strip.getCss().getCssResource().ensureInjected();
        view.setWidget(panelBuilder.apply(strip.getCss().getClassName(),
                                          new Integer[]{clipX, clipY * -1}));
        return view;
    }

    @Inject public  ImageStripDOMGlyphRenderer(final ImageStripRegistry stripRegistry,
                                      final ManagedInstance<WidgetElementRendererView> views);
      ImageStripDOMGlyphRenderer(final ImageStripRegistry stripRegistry,
                               final ManagedInstance<WidgetElementRendererView> views,
                               final BiFunction<String, Integer[], FlowPanel> panelBuilder);

}