public void execute(final GraphContainer graphContainer) { graphContainer.setDirty(true); graphContainer.redoLayout(); TopologyUI.getCurrent().markAsDirtyRecursive(); } }
public void execute(final GraphContainer graphContainer) { graphContainer.setDirty(true); graphContainer.redoLayout(); TopologyUI.getCurrent().markAsDirtyRecursive(); }
public void execute(final GraphContainer graphContainer) { graphContainer.setDirty(true); graphContainer.redoLayout(); TopologyUI.getCurrent().markAsDirtyRecursive(); } }
public void execute(final GraphContainer graphContainer) { graphContainer.setDirty(true); graphContainer.redoLayout(); TopologyUI.getCurrent().markAsDirtyRecursive(); }
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final boolean[] updated = {false}; targets.forEach(vertex -> { updated[0] |= iconManager.removeIconMapping((Vertex) vertex); }); // Redo the layout to apply new icon if (updated[0]) { // HACK! We have no concept of "get the default icon for a vertex" at the moment. // In order to populate the icon, we have to redo the layout operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final boolean[] updated = {false}; targets.forEach(vertex -> { updated[0] |= iconManager.removeIconMapping((Vertex) vertex); }); // Redo the layout to apply new icon if (updated[0]) { // HACK! We have no concept of "get the default icon for a vertex" at the moment. // In order to populate the icon, we have to redo the layout operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }
private static void handleClick(GraphContainer graphContainer, GraphProvider targetGraphProvider, List<VertexRef> verticesToFocus, Breadcrumb breadcrumb) { final String targetNamespace = targetGraphProvider.getNamespace(); final String currentNamespace = graphContainer.getTopologyServiceClient().getNamespace(); // Only Change the layer if namespace is different, otherwise we would switch to the current layer if (!currentNamespace.equals(targetNamespace)) { BreadcrumbCriteria breadcrumbCriteria = getBreadcrumbCriteria(graphContainer); graphContainer.selectTopologyProvider(targetGraphProvider, Callbacks.applyDefaults(), (graphContainer1, graphProvider) -> graphContainer1.addCriteria(breadcrumbCriteria)); breadcrumbCriteria.setNewRoot(breadcrumb); } // Reset focus getCriteriaForGraphContainer(graphContainer, VertexHopGraphProvider.VertexHopCriteria.class).forEach(graphContainer::removeCriteria); // Set elements to focus verticesToFocus.forEach(v -> graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(v))); // Render graphContainer.setDirty(true); graphContainer.redoLayout(); }
private static void handleClick(GraphContainer graphContainer, GraphProvider targetGraphProvider, List<VertexRef> verticesToFocus, Breadcrumb breadcrumb) { final String targetNamespace = targetGraphProvider.getNamespace(); final String currentNamespace = graphContainer.getTopologyServiceClient().getNamespace(); // Only Change the layer if namespace is different, otherwise we would switch to the current layer if (!currentNamespace.equals(targetNamespace)) { BreadcrumbCriteria breadcrumbCriteria = getBreadcrumbCriteria(graphContainer); graphContainer.selectTopologyProvider(targetGraphProvider, Callbacks.applyDefaults(), (graphContainer1, graphProvider) -> graphContainer1.addCriteria(breadcrumbCriteria)); breadcrumbCriteria.setNewRoot(breadcrumb); } // Reset focus getCriteriaForGraphContainer(graphContainer, VertexHopGraphProvider.VertexHopCriteria.class).forEach(graphContainer::removeCriteria); // Set elements to focus verticesToFocus.forEach(v -> graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(v))); // Render graphContainer.setDirty(true); graphContainer.redoLayout(); }
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { final AbstractVertex vertex = (AbstractVertex) targets.get(0); final String preSelectedIconId = operationContext.getGraphContainer().getIconManager().getSVGIconId(vertex); new IconSelectionDialog(preSelectedIconId) .withOkAction(iconWindow -> { final IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final String newIconId = iconWindow.getSelectedIcon(); String newIconKey = iconManager.setIconMapping(vertex, newIconId); if (newIconKey != null) { // We have to temporary update the icon key, otherwise the icon is not updated (redoLayout has no effect) vertex.setIconKey(newIconKey); // Redo the layout to apply new icon operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }) .open(); }
@Override public void execute(List<VertexRef> targets, OperationContext operationContext) { final AbstractVertex vertex = (AbstractVertex) targets.get(0); final String preSelectedIconId = operationContext.getGraphContainer().getIconManager().getSVGIconId(vertex); new IconSelectionDialog(preSelectedIconId) .withOkAction(iconWindow -> { final IconManager iconManager = operationContext.getGraphContainer().getIconManager(); final String newIconId = iconWindow.getSelectedIcon(); String newIconKey = iconManager.setIconMapping(vertex, newIconId); if (newIconKey != null) { // We have to temporary update the icon key, otherwise the icon is not updated (redoLayout has no effect) vertex.setIconKey(newIconKey); // Redo the layout to apply new icon operationContext.getGraphContainer().setDirty(true); operationContext.getGraphContainer().redoLayout(); } }) .open(); }
m_graphContainer.setDirty(true); m_graphContainer.redoLayout();
m_graphContainer.setDirty(true); m_graphContainer.redoLayout();