@Test public void testInitialize() { widget.initialize(item, shapeFactory, itemMouseDownCallback); verify(shapeFactory).getGlyph(ITEM_DEFINITION_ID, AbstractPalette.PaletteGlyphConsumer.class); verify(view, times(1)).render(glyph, ITEM_ICON_SIZE, ITEM_ICON_SIZE); }
@Override public void initialize(final CollapsedDefaultPaletteItem item, final ShapeFactory<?, ?> shapeFactory, final Consumer<PaletteItemMouseEvent> itemMouseDownCallback) { this.item = item; final Glyph glyph = shapeFactory.getGlyph(item.getDefinitionId(), AbstractPalette.PaletteGlyphConsumer.class); this.itemMouseDownCallback = itemMouseDownCallback; view.render(glyph, item.getIconSize(), item.getIconSize()); }
CollapsedDefinitionPaletteItemWidget implements CollapsedDefinitionPaletteItemWidgetView.Presenter { @Override public void initialize(final CollapsedDefaultPaletteItem item, final ShapeFactory<?, ?> shapeFactory, final Consumer<PaletteItemMouseEvent> itemMouseDownCallback) { this.item = item; final Glyph glyph = shapeFactory.getGlyph(item.getDefinitionId(), AbstractPalette.PaletteGlyphConsumer.class); this.itemMouseDownCallback = itemMouseDownCallback; view.render(glyph, item.getIconSize(), item.getIconSize()); } }
CollapsedDefinitionPaletteItemWidget implements CollapsedDefinitionPaletteItemWidgetView.Presenter { @Override public void initialize(final CollapsedDefaultPaletteItem item, final ShapeFactory<?, ?> shapeFactory, final Consumer<PaletteItemMouseEvent> itemMouseDownCallback) { this.item = item; final Glyph glyph = shapeFactory.getGlyph(item.getDefinitionId(), AbstractPalette.PaletteGlyphConsumer.class); this.itemMouseDownCallback = itemMouseDownCallback; view.render(glyph, item.getIconSize(), item.getIconSize()); } @Inject  CollapsedDefinitionPaletteItemWidget(final CollapsedDefinitionPaletteItemWidgetView view); }
CollapsedDefinitionPaletteItemWidget implements CollapsedDefinitionPaletteItemWidgetView.Presenter { @Override public void initialize(final CollapsedDefaultPaletteItem item, final ShapeFactory<?, ?> shapeFactory, final Consumer<PaletteItemMouseEvent> itemMouseDownCallback) { this.item = item; final Glyph glyph = shapeFactory.getGlyph(item.getDefinitionId(), AbstractPalette.PaletteGlyphConsumer.class); this.itemMouseDownCallback = itemMouseDownCallback; view.render(glyph, item.getIconSize(), item.getIconSize()); } @Inject  CollapsedDefinitionPaletteItemWidget(final CollapsedDefinitionPaletteItemWidgetView view); @PostConstruct void setUp(); @PreDestroy void destroy(); @Override void initialize(final CollapsedDefaultPaletteItem item,
                           final ShapeFactory<?, ?> shapeFactory,
                           final Consumer<PaletteItemMouseEvent> itemMouseDownCallback); @Override CollapsedDefaultPaletteItem getItem(); @Override void onMouseDown(final int clientX,
                            final int clientY,
                            final int x,
                            final int y); @Override HTMLElement getElement(); }
CollapsedDefinitionPaletteItemWidget implements CollapsedDefinitionPaletteItemWidgetView.Presenter { @Override public void initialize(final CollapsedDefaultPaletteItem item, final ShapeFactory<?, ?> shapeFactory, final Consumer<PaletteItemMouseEvent> itemMouseDownCallback) { this.item = item; final Glyph glyph = shapeFactory.getGlyph(item.getDefinitionId(), AbstractPalette.PaletteGlyphConsumer.class); this.itemMouseDownCallback = itemMouseDownCallback; view.render(glyph, item.getIconSize(), item.getIconSize()); } @Inject  CollapsedDefinitionPaletteItemWidget(final CollapsedDefinitionPaletteItemWidgetView view); @PostConstruct void setUp(); @PreDestroy void destroy(); @Override void initialize(final CollapsedDefaultPaletteItem item,
                           final ShapeFactory<?, ?> shapeFactory,
                           final Consumer<PaletteItemMouseEvent> itemMouseDownCallback); @Override CollapsedDefaultPaletteItem getItem(); @Override void onMouseDown(final int clientX,
                            final int clientY,
                            final int x,
                            final int y); @Override HTMLElement getElement();  }