Search in sources :

Example 1 with NOPDomainObject

use of org.kie.workbench.common.dmn.api.definition.NOPDomainObject in project kie-wb-common by kiegroup.

the class BaseGrid method fireDomainObjectSelectionEvent.

protected void fireDomainObjectSelectionEvent() {
    final Optional<CanvasHandler> canvasHandler = getCanvasHandler();
    if (!canvasHandler.isPresent()) {
        return;
    }
    final Optional<DomainObject> domainObject = getDomainObject();
    if (!domainObject.isPresent()) {
        domainObjectSelectionEvent.fire(new DomainObjectSelectionEvent(canvasHandler.get(), new NOPDomainObject()));
        return;
    }
    fireDomainObjectSelectionEvent(domainObject.get());
}
Also used : AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) CanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler) DomainObjectSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent) NOPDomainObject(org.kie.workbench.common.dmn.api.definition.NOPDomainObject) DomainObject(org.kie.workbench.common.stunner.core.domainobject.DomainObject) NOPDomainObject(org.kie.workbench.common.dmn.api.definition.NOPDomainObject)

Example 2 with NOPDomainObject

use of org.kie.workbench.common.dmn.api.definition.NOPDomainObject in project kie-wb-common by kiegroup.

the class DMNGraphSubIndex method onNoResultsFound.

@Override
public void onNoResultsFound() {
    getCanvasHandler().ifPresent(canvasHandler -> {
        canvasClearSelectionEventEvent.fire(new CanvasClearSelectionEvent(canvasHandler));
        domainObjectSelectionEvent.fire(new DomainObjectSelectionEvent(canvasHandler, new NOPDomainObject()));
    });
}
Also used : CanvasClearSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.CanvasClearSelectionEvent) DomainObjectSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent) NOPDomainObject(org.kie.workbench.common.dmn.api.definition.NOPDomainObject)

Aggregations

NOPDomainObject (org.kie.workbench.common.dmn.api.definition.NOPDomainObject)2 DomainObjectSelectionEvent (org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent)2 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)1 CanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler)1 CanvasClearSelectionEvent (org.kie.workbench.common.stunner.core.client.canvas.event.selection.CanvasClearSelectionEvent)1 DomainObject (org.kie.workbench.common.stunner.core.domainobject.DomainObject)1