Search in sources :

Example 6 with FormDisplayer

use of org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer in project kie-wb-common by kiegroup.

the class FormsContainer method render.

public void render(final String graphUuid, final Element<? extends Definition<?>> element, final Path diagramPath, final FieldChangeHandler changeHandler) {
    FormDisplayer displayer = getDisplayer(graphUuid, element);
    displayer.render(element, diagramPath, changeHandler);
    if (null != currentDisplayer && !displayer.equals(currentDisplayer)) {
        currentDisplayer.hide();
    }
    displayer.show();
    currentDisplayer = displayer;
}
Also used : FormDisplayer(org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer)

Example 7 with FormDisplayer

use of org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer in project kie-wb-common by kiegroup.

the class FormsContainer method clearDisplayer.

private void clearDisplayer(FormDisplayerKey key) {
    FormDisplayer displayer = formDisplayers.remove(key);
    LOGGER.fine("Clearing form displayer for element: " + key.getElementUid());
    view.removeDisplayer(displayer);
    displayer.hide();
    if (displayer.equals(currentDisplayer)) {
        currentDisplayer = null;
    }
    displayersInstance.destroy(displayer);
}
Also used : FormDisplayer(org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer)

Example 8 with FormDisplayer

use of org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer in project kie-wb-common by kiegroup.

the class FormsContainerTest method createDisplayer.

protected FormDisplayer createDisplayer() {
    FormDisplayer displayer = mock(FormDisplayer.class);
    activeDisplayers.add(displayer);
    return displayer;
}
Also used : FormDisplayer(org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer)

Aggregations

FormDisplayer (org.kie.workbench.common.stunner.forms.client.widgets.container.displayer.FormDisplayer)8 Test (org.junit.Test)3 NodeImpl (org.kie.workbench.common.stunner.core.graph.impl.NodeImpl)2