method2testcases
stringlengths
118
6.63k
### Question: DefinitionPaletteCategoryWidget implements DefinitionPaletteCategoryWidgetView.Presenter { @PreDestroy public void destroy() { definitionPaletteItemWidgetInstance.destroyAll(); definitionPaletteGroupWidgetInstance.destroyAll(); category = null; itemMouseDownCallback = null; } @Inject DefinitionPaletteCat...
### Question: BS3PaletteWidgetImpl extends AbstractPalette<DefaultPaletteDefinition> implements BS3PaletteWidget, IsElement { @Override protected void doDestroy() { shapeGlyphDragHandler.destroy(); view.destroy(); categoryWidgetInstances.destroyAll(); definitionPaletteItemWidgetInstances.destroyAll()...
### Question: BS3PaletteWidgetImpl extends AbstractPalette<DefaultPaletteDefinition> implements BS3PaletteWidget, IsElement { @Override public void onScreenMaximized(final ScreenMaximizedEvent event) { setVisible(event.isDiagramScreen()); } @Inject BS3PaletteWidgetImpl(final ShapeManager shapeManage...
### Question: BS3PaletteWidgetImpl extends AbstractPalette<DefaultPaletteDefinition> implements BS3PaletteWidget, IsElement { @Override public void onScreenMinimized(final ScreenMinimizedEvent event) { setVisible(true); } @Inject BS3PaletteWidgetImpl(final ShapeManager shapeManager, ...
### Question: BS3PaletteWidgetImpl extends AbstractPalette<DefaultPaletteDefinition> implements BS3PaletteWidget, IsElement { @Override public Glyph getShapeDragProxyGlyph(final String definitionId) { return getShapeFactory().getGlyph(definitionId, AbstractPalette.PaletteDragProxyGlyphConsumer.class)...
### Question: BS3PaletteWidgetViewImpl implements BS3PaletteWidgetView, IsElement { @Override @SuppressWarnings("unchecked") public void showDragProxy(String itemId, double x, double y, double width, double height) { final Glyph glyph = presenter.getShapeDragProxyGlyph(i...
### Question: ProfileSelector extends SelectorDelegate<Profile> { public ProfileSelector bind(final Supplier<AbstractSession> sessionSupplier) { final AbstractSession session = sessionSupplier.get(); final Metadata metadata = session.getCanvasHandler().getDiagram().getMetadata(); final String definitionSetId = metadata...
### Question: SelectorImpl implements Selector<T> { @PostConstruct public void init() { view.init(this); this.valueProvider = Object::toString; this.textProvider = Object::toString; this.valueChangedCommand = () -> { }; } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTex...
### Question: SelectorImpl implements Selector<T> { @Override public Selector<T> addItem(final T item) { view.add(textProvider.apply(item), valueProvider.apply(item)); return this; } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T, String> tex...
### Question: SelectorImpl implements Selector<T> { @Override public Selector<T> setSelectedItem(final T item) { view.setValue(valueProvider.apply(item)); return this; } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T, String> textProvider); S...
### Question: SelectorImpl implements Selector<T> { @Override public T getSelectedItem() { return itemProvider.apply(view.getValue()); } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T, String> textProvider); SelectorImpl<T> setValueProvider(f...
### Question: SelectorImpl implements Selector<T> { @Override public Selector<T> clear() { view.clear(); return this; } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T, String> textProvider); SelectorImpl<T> setValueProvider(final Function<T, ...
### Question: SelectorImpl implements Selector<T> { @Override public void onValueChanged() { valueChangedCommand.execute(); } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T, String> textProvider); SelectorImpl<T> setValueProvider(final Functi...
### Question: SelectorImpl implements Selector<T> { @PreDestroy public void destroy() { view.clear(); valueProvider = null; textProvider = null; itemProvider = null; valueChangedCommand = null; } @Inject SelectorImpl(final SelectorView view); @PostConstruct void init(); SelectorImpl<T> setTextProvider(final Function<T...
### Question: SelectorDelegate implements Selector<T> { @Override public Selector<T> addItem(final T item) { getDelegate().addItem(item); return this; } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T> clear(); @Overr...
### Question: SelectorDelegate implements Selector<T> { @Override public Selector<T> setSelectedItem(final T item) { getDelegate().setSelectedItem(item); return this; } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T>...
### Question: DecisionNavigatorBaseItemFactory { public DecisionNavigatorItem makeItem(final Node<View, Edge> node, final DecisionNavigatorItem.Type type) { final String uuid = node.getUUID(); final String label = getLabel(node); final Command onClick = makeOnClickCommand(node); final List<DecisionNavigatorItem> nested...
### Question: SelectorDelegate implements Selector<T> { @Override public T getSelectedItem() { return getDelegate().getSelectedItem(); } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T> clear(); @Override void onValue...
### Question: SelectorDelegate implements Selector<T> { @Override public Selector<T> clear() { getDelegate().clear(); return this; } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T> clear(); @Override void onValueChan...
### Question: SelectorDelegate implements Selector<T> { @Override public void onValueChanged() { getDelegate().onValueChanged(); } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T> clear(); @Override void onValueChange...
### Question: SelectorDelegate implements Selector<T> { @Override public SelectorView getView() { return getDelegate().getView(); } @Override Selector<T> addItem(final T item); @Override Selector<T> setSelectedItem(final T item); @Override T getSelectedItem(); @Override Selector<T> clear(); @Override void onValueChang...
### Question: ScreenPanelViewImpl implements ScreenPanelView { @Override public Widget asWidget() { return panel; } ScreenPanelViewImpl(); ScreenPanelViewImpl(final ResizeFlowPanel panel); @Override ScreenPanelView setWidget(final IsWidget widget); @Override ScreenPanelView clear(); @Override Widget asWidget(); }###...
### Question: DiagramNavigatorItemImpl implements IsWidget, DiagramNavigatorItem { public void show(final DiagramRepresentation diagramRepresentation, final int widthInPx, final int heightInPx, final Command callback) { this.callback = callback; this.name = diagramRepres...
### Question: NavigatorThumbnailItemView extends Composite implements NavigatorItemView<NavigatorItem> { @Override public NavigatorThumbnailItemView setItemPxSize(final int width, final int height) { thumbImage.addLoadHandler((e) -> { final int imgWidth = thumbImage.getWidth(); final int imgHeight = thumbImage.getHeigh...
### Question: TreeExplorer implements IsWidget { public void clear() { view.clear(); } @Inject TreeExplorer(final ChildrenTraverseProcessor childrenTraverseProcessor, final TextPropertyProviderFactory textPropertyProviderFactory, final Event<CanvasSelectionEvent> selecti...
### Question: TreeExplorer implements IsWidget { @PreDestroy public void destroy() { destroyView(); selectedItemCanvasUuid = null; canvasHandler = null; } @Inject TreeExplorer(final ChildrenTraverseProcessor childrenTraverseProcessor, final TextPropertyProviderFactory textPropertyProviderFactor...
### Question: DecisionNavigatorBaseItemFactory { String getName(final Element<? extends Definition> element) { final TextPropertyProvider provider = textPropertyProviderFactory.getProvider(element); return provider.getText(element); } @Inject DecisionNavigatorBaseItemFactory(final DecisionNavigatorNestedItemFactory ne...
### Question: TreeExplorer implements IsWidget { @SuppressWarnings("unchecked") public void show(final CanvasHandler canvasHandler) { this.canvasHandler = canvasHandler; initView(); if (null != canvasHandler && null != canvasHandler.getDiagram()) { doShow(canvasHandler.getDiagram().getGraph()); } } @Inject TreeExplore...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { @Override public void init(final TreeExplorer presenter) { this.presenter = presenter; initWidget(uiBinder.createAndBindUi(this)); handlerRegistration = tree.addSelectionHandler(selectionEvent -> { final TreeItem item = selectionEvent.getSe...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { public TreeExplorer.View destroy() { handlerRegistration.removeHandler(); tree.clear(); tree.removeFromParent(); handlerRegistration = null; presenter = null; return this; } @Inject TreeExplorerView(final Tree<TreeItem> tree); TreeExplor...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { public TreeExplorer.View removeItem(String uuid) { final TreeItem item = tree.getItemByUuid(uuid); if (item != null) { item.remove(); } return this; } @Inject TreeExplorerView(final Tree<TreeItem> tree); TreeExplorerView(final TreeExplor...
### Question: DecisionNavigatorBaseItemFactory { String getTitle(final Element<View> element) { final AdapterManager adapters = definitionUtils.getDefinitionManager().adapters(); final DefinitionAdapter<Object> objectDefinitionAdapter = adapters.forDefinition(); return objectDefinitionAdapter.getTitle(DefinitionUtils.g...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { @Override public TreeExplorer.View clear() { tree.clear(); return this; } @Inject TreeExplorerView(final Tree<TreeItem> tree); TreeExplorerView(final TreeExplorer presenter, final Tree<TreeItem> tree, ...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { @Override public boolean isContainer(final String uuid) { final TreeItem oldItem = tree.getItemByUuid(uuid); return oldItem.getType().equals(TreeItem.Type.CONTAINER) || oldItem.getType().equals(TreeItem.Type.ROOT); } @Inject TreeExplorerVi...
### Question: TreeExplorerView extends Composite implements TreeExplorer.View { public TreeExplorer.View setSelectedItem(final String uuid) { final TreeItem selectedItem = tree.getItemByUuid(uuid); tree.setSelectedItem(selectedItem, false); return this; } @Inject TreeExplorerView(final Tree<TreeItem> tree); TreeExpl...
### Question: NotificationsObserver { @SuppressWarnings("unchecked") void onGraphCommandExecuted(final @Observes CanvasCommandExecutedEvent<? extends CanvasHandler> commandExecutedEvent) { final Notification notification = translateCommand(commandExecutedEvent); fireCommandNotification(notification); } @Inject Notific...
### Question: DecisionNavigatorNestedItemFactory { public DecisionNavigatorItem makeItem(final Node<View, Edge> node) { final String uuid = getUUID(node); final DecisionNavigatorItem.Type type = getType(node); final String label = getLabel(node); final String parentUUID = node.getUUID(); final Command onClick = makeOnC...
### Question: NotificationsObserver { @SuppressWarnings("unchecked") void onCanvasCommandUndoneEvent(final @Observes CanvasCommandUndoneEvent<? extends CanvasHandler> commandUndoneEvent) { final Notification notification = translateCommand(commandUndoneEvent); fireCommandNotification(notification); } @Inject Notificat...
### Question: NotificationsObserver { @SuppressWarnings("unchecked") void onCanvasValidationSuccessEvent(final @Observes CanvasValidationSuccessEvent validationSuccessEvent) { final NotificationContext context = buildContext(validationSuccessEvent); handleValidationExecuted(context); handleValidationSuccess(context); }...
### Question: NotificationsObserver { @SuppressWarnings("unchecked") void onCanvasValidationFailEvent(final @Observes CanvasValidationFailEvent validationFailEvent) { final NotificationContext context = buildContext(validationFailEvent); handleValidationExecuted(context); handleValidationFailed(validationFailEvent, con...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public LienzoPanel show(final LienzoLayer layer) { getDelegate().show(layer); return this; } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, final int width, ...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public LienzoPanel setPixelSize(final int wide, final int high) { getDelegate().setPixelSize(wide, high); return this; } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, ...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public void setBackgroundLayer(final Layer layer) { getDelegate().setBackgroundLayer(layer); } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, final int width, ...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public LienzoPanel focus() { getDelegate().focus(); return this; } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, final int width, final...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public void destroy() { getDelegate().destroy(); } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, final int width, final int height); @O...
### Question: DecisionNavigatorNestedItemFactory { Command makeOnClickCommand(final Node<View, Edge> node, final String uuid) { return () -> { final CanvasHandler canvas = dmnGraphUtils.getCanvasHandler(); canvasSelectionEvent.fire(makeCanvasSelectionEvent(canvas, uuid)); editExpressionEvent.fire(makeEditExpressionEven...
### Question: DelegateLienzoPanel implements LienzoPanel { @Override public Widget asWidget() { return getDelegate().asWidget(); } @Override LienzoPanel show(final LienzoLayer layer); @Override LienzoPanel show(final LienzoLayer layer, final int width, final int ...
### Question: PreviewLienzoPanel extends DelegateLienzoPanel<StunnerLienzoBoundsPanel> { @PostConstruct public void init() { panel.setPanelBuilder((width, height) -> new PreviewPanel(width.orElse(300), height.orElse(150))); } @Inject PreviewLienzoPanel(final StunnerLienzoBoundsPanel panel); @PostConstruct void init();...
### Question: ScrollableLienzoPanelView extends ScrollablePanel implements StunnerLienzoBoundsPanelView { @Override public void setPresenter(final StunnerLienzoBoundsPanel presenter) { if (!isRemoteCommunicationEnabled()) { DomGlobal.console.debug("Kogito environment detected. Skipping default event handling."); return...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { @Override public LienzoPanel show(final LienzoLayer layer) { return doShow(layer, OptionalInt.empty(), OptionalInt.empty()); } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDo...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { @Override public LienzoPanel focus() { view.setFocus(true); return this; } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyDownEvent, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { @Override public LienzoPanel setPixelSize(final int wide, final int high) { getLienzoPanel().setPixelSize(wide, high); return this; } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Even...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { @Override public void setBackgroundLayer(final Layer layer) { getLienzoPanel().setBackgroundLayer(layer); } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyDownEve...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { public void destroy() { handlerRegistrationManager.destroy(); view.destroy(); panelBuilder = null; view = null; } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyD...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { void onMouseDown() { broadcastBlurEvent(); mouseDownEvent.fire(new CanvasMouseDownEvent()); } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyDownEvent, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { void onMouseUp() { broadcastBlurEvent(); mouseUpEvent.fire(new CanvasMouseUpEvent()); } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyDownEvent, ...
### Question: DecisionNavigatorNestedItemFactory { CanvasSelectionEvent makeCanvasSelectionEvent(final CanvasHandler canvas, final String uuid) { return new CanvasSelectionEvent(canvas, uuid); } @Inject DecisionNavigatorNestedItemFactory(final SessionManager sessionManager, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { void onKeyPress(final int unicodeChar) { final KeyboardEvent.Key key = getKey(unicodeChar); if (null != key) { keyPressEvent.fire(new KeyPressEvent(key)); } } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { void onKeyDown(final int unicodeChar) { final KeyboardEvent.Key key = getKey(unicodeChar); if (null != key) { keyDownEvent.fire(new KeyDownEvent(key)); } } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { void onKeyUp(final int unicodeChar) { final KeyboardEvent.Key key = getKey(unicodeChar); if (null != key) { keyUpEvent.fire(new KeyUpEvent(key)); } } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, ...
### Question: StunnerLienzoBoundsPanel implements LienzoPanel { @Override public Bounds getLocationConstraints() { return Bounds.createMinBounds(0d, 0d); } @Inject StunnerLienzoBoundsPanel(final Event<KeyPressEvent> keyPressEvent, final Event<KeyDownEvent> keyDownEvent, ...
### Question: ScrollableLienzoPanel extends DelegateLienzoPanel<StunnerLienzoBoundsPanel> { @PostConstruct public void init() { panel.setPanelBuilder((width, height) -> { if (width.isPresent() && height.isPresent()) { return new ScrollableLienzoPanelView(width.getAsInt(), height.getAsInt()); } return new ScrollableLien...
### Question: ScrollableLienzoPanel extends DelegateLienzoPanel<StunnerLienzoBoundsPanel> { public ScrollableLienzoPanel refresh() { getDelegate().getView().refresh(); return this; } @Inject ScrollableLienzoPanel(final StunnerLienzoBoundsPanel panel); @PostConstruct void init(); ScrollableLienzoPanel refresh(); }### ...
### Question: ScalableLienzoPanel extends DelegateLienzoPanel<StunnerLienzoBoundsPanel> { @PostConstruct public void init() { panel.setPanelBuilder((width, height) -> { if (width.isPresent() && height.isPresent()) { return new ScalablePanel(StunnerBoundsProviderFactory.newProvider(), width.getAsInt(), height.getAsInt()...
### Question: StunnerBoundsProviderFactory { public static WiresBoundsProvider newProvider() { return new WiresBoundsProvider() .setPadding(PADDING) .setBoundsBuilder(boundingBox -> computeBoundsAspectRatio(ASPECT_RATIO, boundingBox)); } static WiresBoundsProvider newProvider(); static double computeWidth(final double...
### Question: PopupUtil { public void showConfirmPopup(final String title, final String okButtonText, final String confirmMessage, final Command okCommand) { confirmPopup.show(title, okButtonText, confirmMessage, okCommand); } PopupUtil(); @Inject PopupUtil(final ConfirmPopup confirmPopup); void showConfirmPopup(final...
### Question: DecisionNavigatorNestedItemFactory { EditExpressionEvent makeEditExpressionEvent(final Node<View, Edge> node) { final ClientSession currentSession = sessionManager.getCurrentSession(); final Object definition = DefinitionUtils.getElementDefinition(node); final HasExpression hasExpression = helper.getHasEx...
### Question: PopupUtil { public void showYesNoCancelPopup(final String title, final String message, final Command yesCommand, final Command noCommand) { final Command cancelCommand = () -> { }; final YesNoCancelPopup yesNoCancelPopup = buildYesNoCancelPopup(title, message, yesCommand, noCommand, cancelCommand); yesNoC...
### Question: LienzoImageStripLoader implements SessionInitializer { @Override public void init(final Metadata metadata, final Command completeCallback) { final Annotation qualifier = definitionUtils.getQualifier(metadata.getDefinitionSetId()); strips = stripRegistry.get(DefinitionManager.DEFAULT_QUALIFIER, qualifier);...
### Question: LienzoImageStripLoader implements SessionInitializer { @Override public void destroy() { lienzoImageStrips.remove(strips); strips = null; } protected LienzoImageStripLoader(); @Inject LienzoImageStripLoader(final DefinitionUtils definitionUtils, final ImageStripRegistry...
### Question: LienzoImageStripGlyphRenderer implements LienzoGlyphRenderer<ImageStripGlyph> { @Override public Class<ImageStripGlyph> getGlyphType() { return ImageStripGlyph.class; } LienzoImageStripGlyphRenderer(); LienzoImageStripGlyphRenderer(BiFunction<String, Integer, Image> imageBuilder); @Override Class<ImageS...
### Question: LienzoImageStripGlyphRenderer implements LienzoGlyphRenderer<ImageStripGlyph> { @Override public Group render(final ImageStripGlyph glyph, final double width, final double height) { final Group group = new Group(); final Image image = imageBuilder.apply(ImageStripRegistry.getName(glyph.getStripType()), gl...
### Question: LienzoShapeGlyphRenderer implements LienzoGlyphRenderer<ShapeGlyph> { @Override public Class<ShapeGlyph> getGlyphType() { return ShapeGlyph.class; } protected LienzoShapeGlyphRenderer(); @Inject LienzoShapeGlyphRenderer(final FactoryManager factoryManager); LienzoShapeGlyphRenderer(final FactoryManage...
### Question: LienzoShapeGlyphRenderer implements LienzoGlyphRenderer<ShapeGlyph> { @Override @SuppressWarnings("unchecked") public Group render(final ShapeGlyph glyph, final double width, final double height) { final String definitionId = glyph.getDefinitionId(); final Supplier<ShapeFactory> factorySupplier = glyph.ge...
### Question: ShapeGlyphDragHandler { public ShapeGlyphDragHandler show(final ShapeGlyphDragHandler.Item item, final int x, final int y, final ShapeGlyphDragHandler.Callback Callback) { final Layer dragProxyLayer = new Layer(); this.dragProxyPanel = lienzoPanelBuilder.apply(item); dragProxyPanel.add(dragProxyLayer); at...
### Question: ShapeGlyphDragHandler { public void clear() { clearState(() -> dragProxyPanel.clear()); } @Inject ShapeGlyphDragHandler(final LienzoGlyphRenderers glyphLienzoGlyphRenderer); ShapeGlyphDragHandler(final LienzoGlyphRenderer<Glyph> glyphLienzoGlyphRenderer, final List<HandlerRegi...
### Question: ShapeGlyphDragHandler { public void destroy() { clearState(() -> dragProxyPanel.destroy()); } @Inject ShapeGlyphDragHandler(final LienzoGlyphRenderers glyphLienzoGlyphRenderer); ShapeGlyphDragHandler(final LienzoGlyphRenderer<Glyph> glyphLienzoGlyphRenderer, final List<Handler...
### Question: DecisionNavigatorNestedItemFactory { String getUUID(final Node<View, Edge> node) { final Expression expression = getExpression(node); return expression.getId().getValue(); } @Inject DecisionNavigatorNestedItemFactory(final SessionManager sessionManager, final...
### Question: LienzoSvgDataUriGlyphRenderer extends AbstractLienzoShapeGlyphRenderer<SvgDataUriGlyph, Picture> { @Override public Class<SvgDataUriGlyph> getGlyphType() { return SvgDataUriGlyph.class; } protected LienzoSvgDataUriGlyphRenderer(); @Inject LienzoSvgDataUriGlyphRenderer(final SvgDataUriGenerator svgDataUr...
### Question: LienzoPictureGlyphRenderer extends AbstractLienzoShapeGlyphRenderer<ImageDataUriGlyph, Picture> { @Override public Class<ImageDataUriGlyph> getGlyphType() { return ImageDataUriGlyph.class; } LienzoPictureGlyphRenderer(); LienzoPictureGlyphRenderer(final BiConsumer<String, Consumer<Picture>> pictureBuild...
### Question: LienzoGlyphRenderers implements LienzoGlyphRenderer<Glyph> { @Override public Class<Glyph> getGlyphType() { return Glyph.class; } protected LienzoGlyphRenderers(); @Inject LienzoGlyphRenderers(final @Any ManagedInstance<LienzoGlyphRenderer> rendererInstances); @PostConstruct void init(); @Override @Supp...
### Question: LienzoGlyphRenderers implements LienzoGlyphRenderer<Glyph> { @Override @SuppressWarnings("unchecked") public Group render(final Glyph glyph, final double width, final double height) { return (Group) getRenderer(glyph.getClass()) .render(glyph, width, height); } protected LienzoGlyphRenderers(); @Inject ...
### Question: LienzoGlyphRenderers implements LienzoGlyphRenderer<Glyph> { @PreDestroy public void destroy() { renderers.clear(); rendererInstances.destroyAll(); } protected LienzoGlyphRenderers(); @Inject LienzoGlyphRenderers(final @Any ManagedInstance<LienzoGlyphRenderer> rendererInstances); @PostConstruct void ini...
### Question: LienzoImageStrips { public void register(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] strips, final Command callback) { List<org.kie.workbench.common.stunner.core.client.shape.ImageStrip> candidates = new LinkedList<>(); for (org.kie.workbench.common.stunner.core.client.shape.Imag...
### Question: LienzoImageStrips { void removeFromLienzo(final String name) { Optional.ofNullable(imageStrips.get(name)) .ifPresent(imageStrip -> imageStrips.remove(name)); } LienzoImageStrips(); LienzoImageStrips(final ImageStrips imageStrips); void register(final org.kie.workbench.common.stunner.core.client.shape.Im...
### Question: LienzoImageStrips { @PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); } LienzoImageStrips(); LienzoImageStrips(final ImageStrips imageStrips); void register(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] str...
### Question: LienzoTextTooltip extends AbstractCanvasTooltip<String> { @Override public void hide() { tooltip.hide(); } LienzoTextTooltip(); LienzoTextTooltip(final PrimitiveTooltip tooltip); @Override void showAt(final String content, final Point2D location); @Override void hide(); @Override ...
### Question: DecisionNavigatorNestedItemFactory { String getLabel(final Node<View, Edge> node) { final Optional<Expression> expression = Optional.of(getExpression(node)); return expressionEditorDefinitionsSupplier.get().getExpressionEditorDefinition(expression).get().getName(); } @Inject DecisionNavigatorNestedItemFa...
### Question: LienzoTextTooltip extends AbstractCanvasTooltip<String> { @Override public void destroy() { tooltip.remove(); } LienzoTextTooltip(); LienzoTextTooltip(final PrimitiveTooltip tooltip); @Override void showAt(final String content, final Point2D location); @Override void hide(); @Over...
### Question: LienzoCanvasNotification { public void init(final Supplier<LienzoPanel> panel) { this.panel = panel; this.outHandler = panel.get().getView().addMouseOutHandler(mouseOutEvent -> hide()); } @Inject LienzoCanvasNotification(final View view); void init(final Supplier<LienzoPanel> panel); void show(final Stri...
### Question: LienzoCanvasNotification { public void show(final String text) { final LienzoPanel p = panel.get(); final int absoluteLeft = p.getView().getAbsoluteLeft(); final int absoluteTop = p.getView().getAbsoluteTop(); final int width = p.getWidthPx(); final double x = absoluteLeft + (width / 2) - (5 * text.length...
### Question: LienzoCanvasNotification { public void hide() { view.setText(""); view.hide(); } @Inject LienzoCanvasNotification(final View view); void init(final Supplier<LienzoPanel> panel); void show(final String text); void hide(); @PreDestroy void destroy(); }### Answer: @Test public void testHide() { tested.hide...
### Question: LienzoCanvasNotification { @PreDestroy public void destroy() { if (null != outHandler) { outHandler.removeHandler(); outHandler = null; } panel = null; } @Inject LienzoCanvasNotification(final View view); void init(final Supplier<LienzoPanel> panel); void show(final String text); void hide(); @PreDestroy...
### Question: LienzoPanelFocusHandler { public LienzoPanelFocusHandler listen(final LienzoPanel panel, final Command onFocus, final Command onLostFocus) { clear(); overHandler = panel.getView().addMouseOverHandler(mouseOverEvent -> onFocus.execute()); outHandler = panel.getView().addMouseOutHandler(mouseOutEvent -> onL...
### Question: LienzoPanelFocusHandler { public LienzoPanelFocusHandler clear() { if (null != overHandler) { overHandler.removeHandler(); overHandler = null; } if (null != outHandler) { outHandler.removeHandler(); outHandler = null; } return this; } LienzoPanelFocusHandler listen(final LienzoPanel panel, ...
### Question: AlertView implements IsElement { public void setText(final String text) { this.text.setTextContent(text); } void setText(final String text); }### Answer: @Test public void testSetText() { tested = new AlertView(); tested.text = span; tested.setText("hello alert"); verify(span, times(1)).setTextContent(e...
### Question: MorphActionsToolboxView extends AbstractActionsToolboxView<MorphActionsToolboxView> { @Override protected void addButton(final ButtonItem buttonItem) { gridItem.add(buttonItem); } @Inject MorphActionsToolboxView(final LienzoGlyphRenderers glyphRenderers); MorphActionsToolboxView(final LienzoGlyphRender...
### Question: DecisionNavigatorNestedItemFactory { DecisionNavigatorItem.Type getType(final Node<View, Edge> node) { return ITEM_TYPE_BY_EXPRESSION.get(getExpression(node).getClass()); } @Inject DecisionNavigatorNestedItemFactory(final SessionManager sessionManager, final ...
### Question: ZoomLevelSelectorItem implements IsElement { public ZoomLevelSelectorItem setText(final String value) { levelItemText.setTextContent(value); return this; } ZoomLevelSelectorItem setText(final String value); ZoomLevelSelectorItem setOnClick(final Command onClick); void select(); void reset(); @PreDestroy ...
### Question: ZoomLevelSelectorItem implements IsElement { public void select() { levelItem.setClassName(ITEM_CLASS_NAME + " " + ITEM_SELECTED); } ZoomLevelSelectorItem setText(final String value); ZoomLevelSelectorItem setOnClick(final Command onClick); void select(); void reset(); @PreDestroy void destroy(); }### A...