@Test public void testShow() { tested.init(canvasHandler); tested.register(element); assertTrue(tested.isRegistered(element)); tested.show(element); verify(toolbox, times(1)).show(); verify(toolbox, never()).hide(); verify(toolbox, never()).destroy(); }
@SuppressWarnings("unchecked") public ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid) { if (showToolboxPredicate.test(uuid)) { final Node node = canvasHandler.getGraphIndex().getNode(uuid); if (null != node) { return show(node); } } return this; }
ToolboxControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ToolboxControl<AbstractCanvasHandler, Element> { @SuppressWarnings("unchecked") public ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid) { if (showToolboxPredicate.test(uuid)) { final Node node = canvasHandler.getGraphIndex().getNode(uuid); if (null != node) { return show(node); } } return this; } }
ToolboxControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ToolboxControl<AbstractCanvasHandler, Element> { @SuppressWarnings("unchecked") public ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid) { if (showToolboxPredicate.test(uuid)) { final Node node = canvasHandler.getGraphIndex().getNode(uuid); if (null != node) { return show(node); } } return this; } ToolboxControlImpl(final Supplier<List<F>> toolboxFactories);   ToolboxControlImpl(final Supplier<List<F>> toolboxFactories,
                       final Predicate<String> showToolboxPredicate); }
ToolboxControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ToolboxControl<AbstractCanvasHandler, Element> { @SuppressWarnings("unchecked") public ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid) { if (showToolboxPredicate.test(uuid)) { final Node node = canvasHandler.getGraphIndex().getNode(uuid); if (null != node) { return show(node); } } return this; } ToolboxControlImpl(final Supplier<List<F>> toolboxFactories);   ToolboxControlImpl(final Supplier<List<F>> toolboxFactories,
                       final Predicate<String> showToolboxPredicate); @Override @SuppressWarnings("unchecked") void register(final Element element); @Override Iterator<Toolbox<?>> getToolboxes(final Element element); void destroyToolboxes(); void hideAndDestroyToolboxes(); @SuppressWarnings("unchecked") ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid); ToolboxControl<AbstractCanvasHandler, Element> show(final Element element); AbstractCanvasHandler getCanvasHandler(); boolean isActive(final String uuid); }
ToolboxControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ToolboxControl<AbstractCanvasHandler, Element> { @SuppressWarnings("unchecked") public ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid) { if (showToolboxPredicate.test(uuid)) { final Node node = canvasHandler.getGraphIndex().getNode(uuid); if (null != node) { return show(node); } } return this; } ToolboxControlImpl(final Supplier<List<F>> toolboxFactories);   ToolboxControlImpl(final Supplier<List<F>> toolboxFactories,
                       final Predicate<String> showToolboxPredicate); @Override @SuppressWarnings("unchecked") void register(final Element element); @Override Iterator<Toolbox<?>> getToolboxes(final Element element); void destroyToolboxes(); void hideAndDestroyToolboxes(); @SuppressWarnings("unchecked") ToolboxControl<AbstractCanvasHandler, Element> show(final String uuid); ToolboxControl<AbstractCanvasHandler, Element> show(final Element element); AbstractCanvasHandler getCanvasHandler(); boolean isActive(final String uuid); static final Predicate<String> ALWAYS_SHOW_PREDICATE; }