use of org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramSelected in project kie-wb-common by kiegroup.
the class DRDNameChangerView method onClickReturnToDRG.
@EventHandler("returnToDRG")
void onClickReturnToDRG(final ClickEvent event) {
hideDRDNameChanger();
selectedEvent.fire(new DMNDiagramSelected(dmnDiagramsSession.getDRGDiagramElement()));
}
use of org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramSelected in project kie-wb-common by kiegroup.
the class DRDNameChangerView method performSave.
private void performSave(final DMNDiagramElement dmnDiagramElement) {
dmnDiagramElement.getName().setValue(drdNameInput.getValue());
selectedEvent.fire(new DMNDiagramSelected(dmnDiagramElement));
}
use of org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramSelected in project kie-wb-common by kiegroup.
the class DRDContextMenuService method addToExistingDRD.
public void addToExistingDRD(final DMNDiagramTuple dmnDiagram, final Collection<Node<? extends Definition<?>, Edge>> selectedNodes) {
selectedNodes.forEach(addNodesToDRD(dmnDiagram.getDMNDiagram(), dmnDiagram.getStunnerDiagram()));
selectedEvent.fire(new DMNDiagramSelected(dmnDiagram.getDMNDiagram()));
}
use of org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramSelected in project kie-wb-common by kiegroup.
the class DRDContextMenuService method removeFromCurrentDRD.
public void removeFromCurrentDRD(final Collection<Node<? extends Definition<?>, Edge>> selectedNodes) {
final Diagram diagram = dmnDiagramsSession.getCurrentDiagram().orElse(dmnDiagramsSession.getDRGDiagram());
selectedNodes.forEach(node -> diagram.getGraph().removeNode(node.getUUID()));
dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(dmnDiagramElement -> selectedEvent.fire(new DMNDiagramSelected(dmnDiagramElement)));
}
use of org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramSelected in project kie-wb-common by kiegroup.
the class DRDContextMenuService method addToNewDRD.
public void addToNewDRD(final Collection<Node<? extends Definition<?>, Edge>> selectedNodes) {
final DMNDiagramElement dmnElement = makeDmnDiagramElement();
final Diagram stunnerElement = buildStunnerElement(dmnElement);
selectedNodes.forEach(addNodesToDRD(dmnElement, stunnerElement));
addDmnDiagramElementToDRG(dmnElement);
dmnDiagramsSession.add(dmnElement, stunnerElement);
selectedEvent.fire(new DMNDiagramSelected(dmnElement));
}
Aggregations