private void setGraph(Graph graph) { m_graph = graph; getViewManager().setMapBounds(graph.getLayout().getBounds()); }
private void setGraph(Graph graph) { m_graph = graph; getViewManager().setMapBounds(graph.getLayout().getBounds()); }
public void showAllMap(){ getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().getBounds()); }
public void showAllMap(){ getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().getBounds()); }
private void computeBoundsForSelected(SelectionContext selectionContext) { if(selectionContext.getSelectedVertexRefs().size() > 0) { Collection<? extends Vertex> visible = m_graphContainer.getGraph().getDisplayVertices(); Collection<VertexRef> selected = selectionContext.getSelectedVertexRefs(); Collection<VertexRef> vRefs = new ArrayList<>(); for(VertexRef vRef : selected) { if(visible.contains(vRef)) { vRefs.add(vRef); } } getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().computeBoundingBox(vRefs)); } else { getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().getBounds()); } }
private void computeBoundsForSelected(SelectionContext selectionContext) { if(selectionContext.getSelectedVertexRefs().size() > 0) { Collection<? extends Vertex> visible = m_graphContainer.getGraph().getDisplayVertices(); Collection<VertexRef> selected = selectionContext.getSelectedVertexRefs(); Collection<VertexRef> vRefs = new ArrayList<>(); for(VertexRef vRef : selected) { if(visible.contains(vRef)) { vRefs.add(vRef); } } getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().computeBoundingBox(vRefs)); } else { getViewManager().setBoundingBox(m_graphContainer.getGraph().getLayout().getBounds()); } }
@Override public void mapPhysicalBounds(int width, int height) { getState().setPhysicalDimensions(width, height); getViewManager().setViewPort(width, height); getViewManager().setMapBounds(m_graph.getLayout().getBounds()); }
@Override public void mapPhysicalBounds(int width, int height) { getState().setPhysicalDimensions(width, height); getViewManager().setViewPort(width, height); getViewManager().setMapBounds(m_graph.getLayout().getBounds()); }