private boolean loadSemanticZoomLevel(VaadinRequest request) { String szl = request.getParameter(TopologyLinkBuilder.PARAMETER_SEMANTIC_ZOOM_LEVEL); if (szl != null) { try { m_graphContainer.setSemanticZoomLevel(Integer.parseInt(szl)); return true; } catch (NumberFormatException e) { LOG.warn("Invalid SZL found in {} parameter: {}", TopologyLinkBuilder.PARAMETER_SEMANTIC_ZOOM_LEVEL, szl); } } return false; }
@Override public void setSemanticZoomLevel(int semanticZoomLevel) { m_graphContainer.setSemanticZoomLevel(semanticZoomLevel); m_graphContainer.redoLayout(); }
private boolean loadSemanticZoomLevel(VaadinRequest request) { String szl = request.getParameter(TopologyLinkBuilder.PARAMETER_SEMANTIC_ZOOM_LEVEL); if (szl != null) { try { m_graphContainer.setSemanticZoomLevel(Integer.parseInt(szl)); return true; } catch (NumberFormatException e) { LOG.warn("Invalid SZL found in {} parameter: {}", TopologyLinkBuilder.PARAMETER_SEMANTIC_ZOOM_LEVEL, szl); } } return false; }
@Override public void setSemanticZoomLevel(int semanticZoomLevel) { m_graphContainer.setSemanticZoomLevel(semanticZoomLevel); m_graphContainer.redoLayout(); }
public static GraphContainer.Callback applyDefaultSemanticZoomLevel() { return (graphContainer, graphProvider) -> graphContainer.setSemanticZoomLevel(graphProvider.getDefaults().getSemanticZoomLevel()); }
public static GraphContainer.Callback applyDefaultSemanticZoomLevel() { return (graphContainer, graphProvider) -> graphContainer.setSemanticZoomLevel(graphProvider.getDefaults().getSemanticZoomLevel()); }
m_graphContainer.clearCriteria(); refs.forEach(vertexRef -> m_graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(vertexRef))); m_graphContainer.setSemanticZoomLevel(1);
private void focusOnVertices(VertexRef target, Set<GraphVertex> graphVerticesToFocus, GraphContainer container) { // add to focus removeHopCriteria(container); graphVerticesToFocus.forEach(graphVertex -> container.addCriteria( new DefaultVertexHopCriteria(createTopologyVertex(graphVertex)))); // add the context vertex because it is missing in the root cause result container.addCriteria(new DefaultVertexHopCriteria(target)); container.setSemanticZoomLevel(0); // Remove the current selection before redrawing the layout in order // to avoid centering on the current vertex container.getSelectionManager().setSelectedVertexRefs(Collections.emptyList()); container.getSelectionManager().setSelectedEdgeRefs(Collections.emptyList()); container.redoLayout(); }
m_graphContainer.clearCriteria(); refs.forEach(vertexRef -> m_graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(vertexRef))); m_graphContainer.setSemanticZoomLevel(1);
public void apply(GraphContainer graphContainer, Collection<HistoryOperation> operations) { LOG.debug("Applying " + toString()); // Apply the history for each registered HistoryOperation for (HistoryOperation operation : operations) { try { operation.applyHistory(graphContainer, m_settings); } catch (Throwable e) { LOG.warn("Failed to perform applyHistory() operation", e); } } // Set Vertices in Focus after all other operations are applied, otherwise the topology provider may have changed // which results in a graphContainer.clearCriteria() applyVerticesInFocus(m_focusVertices, graphContainer); applySavedLocations(m_locations, graphContainer.getGraph().getLayout()); graphContainer.setSemanticZoomLevel(getSemanticZoomLevel()); graphContainer.getSelectionManager().setSelectedVertexRefs(m_selectedVertices); // Apply the selected vertices graphContainer.getMapViewManager().setBoundingBox(getBoundingBox()); }
graphContainer.setSemanticZoomLevel(getSemanticZoomLevel());
graphContainer.setSemanticZoomLevel(getSemanticZoomLevel());