Search in sources :

Example 1 with ItemCallback

use of org.kie.workbench.common.stunner.lienzo.Decorator.ItemCallback in project kie-wb-common by kiegroup.

the class PaletteTest method testCreateDecoratorCallback.

@Test
public void testCreateDecoratorCallback() {
    arrayOfPrimitives = new IPrimitive[] { firstPrimitive, secondPrimitive };
    miniPalette = spy(new Palette().setIconSize(ICON_SIZE).setItemCallback(callback).setPadding(PADDING).setX(X).setY(Y));
    ItemCallback callback = spy(miniPalette.createDecoratorCallback(1, 0, 0));
    callback.onShow(6.0, 4.0);
    verify(miniPalette).doShowItem(1, 6.0, 4.0, 0, 0);
    callback.onHide();
    verify(miniPalette).doItemOut(1);
}
Also used : ItemCallback(org.kie.workbench.common.stunner.lienzo.Decorator.ItemCallback) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ItemCallback (org.kie.workbench.common.stunner.lienzo.Decorator.ItemCallback)1