/** * Shortcut to validateCell with visible set to true. */ public mxRectangle getBoundingBox(mxCellState state) { return getBoundingBox(state, true); }
/** * Shortcut to validateCell with visible set to true. */ public mxRectangle getBoundingBox(mxCellState state) { return getBoundingBox(state, true); }
/** * First validates all bounds and then validates all points recursively on * all visible cells. */ public void validate() { mxRectangle graphBounds = getBoundingBox(validateCellState(validateCell((currentRoot != null) ? currentRoot : graph.getModel().getRoot()))); setGraphBounds((graphBounds != null) ? graphBounds : new mxRectangle()); }
/** * First validates all bounds and then validates all points recursively on * all visible cells. */ public void validate() { mxRectangle graphBounds = getBoundingBox(validateCellState(validateCell((currentRoot != null) ? currentRoot : graph.getModel().getRoot()))); setGraphBounds((graphBounds != null) ? graphBounds : new mxRectangle()); }
mxRectangle bounds = view.getBoundingBox(view.validateCellState(view.validateCell(cells[i])));
mxRectangle bounds = view.getBoundingBox(view.validateCellState(view.validateCell(cells[i])));
/** * */ public void start(MouseEvent e) { if (isLivePreview()) { movePreview.start(e, graphComponent.getGraph().getView().getState(initialCell)); } else { mxGraph graph = graphComponent.getGraph(); // Constructs an array with cells that are indeed movable cells = getCells(initialCell); cellBounds = graph.getView().getBounds(cells); if (cellBounds != null) { // Updates the size of the graph handler that is in // charge of painting all other handlers bbox = graph.getView().getBoundingBox(cells); Rectangle bounds = cellBounds.getRectangle(); bounds.width += 1; bounds.height += 1; setPreviewBounds(bounds); } } first = e.getPoint(); }
/** * */ public void start(MouseEvent e) { if (isLivePreview()) { movePreview.start(e, graphComponent.getGraph().getView().getState(initialCell)); } else { mxGraph graph = graphComponent.getGraph(); // Constructs an array with cells that are indeed movable cells = getCells(initialCell); cellBounds = graph.getView().getBounds(cells); if (cellBounds != null) { // Updates the size of the graph handler that is in // charge of painting all other handlers bbox = graph.getView().getBoundingBox(cells); Rectangle bounds = cellBounds.getRectangle(); bounds.width += 1; bounds.height += 1; setPreviewBounds(bounds); } } first = e.getPoint(); }
mxRectangle bounds = getBoundingBox( getState(model.getChildAt(state.getCell(), i)), true);
mxRectangle bounds = getBoundingBox( getState(model.getChildAt(state.getCell(), i)), true);
@Override public void zoomTo( final double newScale, final boolean center ) { final mxGraphView view = graph.getView(); final double scale = view.getScale(); final mxPoint translate = ( pageVisible && centerPage ) ? getPageTranslate( newScale ) : new mxPoint(); graph.getView().scaleAndTranslate( newScale, translate.getX(), translate.getY() ); if ( keepSelectionVisibleOnZoom && !graph.isSelectionEmpty() ) { getGraphControl().scrollRectToVisible( view.getBoundingBox( graph.getSelectionCells() ).getRectangle() ); } else { maintainScrollBar( true, newScale / scale, center ); maintainScrollBar( false, newScale / scale, center ); } }
@Override public void zoomTo( final double newScale, final boolean center ) { final mxGraphView view = graph.getView(); final double scale = view.getScale(); final mxPoint translate = ( pageVisible && centerPage ) ? getPageTranslate( newScale ) : new mxPoint(); graph.getView().scaleAndTranslate( newScale, translate.getX(), translate.getY() ); if ( keepSelectionVisibleOnZoom && !graph.isSelectionEmpty() ) { getGraphControl().scrollRectToVisible( view.getBoundingBox( graph.getSelectionCells() ).getRectangle() ); } else { maintainScrollBar( true, newScale / scale, center ); maintainScrollBar( false, newScale / scale, center ); } }
/** * */ public void zoom(double factor) { mxGraphView view = graph.getView(); double newScale = (double) ((int) (view.getScale() * 100 * factor)) / 100; if (newScale != view.getScale() && newScale > 0.04) { mxPoint translate = (pageVisible && centerPage) ? getPageTranslate(newScale) : new mxPoint(); graph.getView().scaleAndTranslate(newScale, translate.getX(), translate.getY()); if (keepSelectionVisibleOnZoom && !graph.isSelectionEmpty()) { getGraphControl().scrollRectToVisible( view.getBoundingBox(graph.getSelectionCells()) .getRectangle()); } else { maintainScrollBar(true, factor, centerZoom); maintainScrollBar(false, factor, centerZoom); } } }
/** * */ public void zoom(double factor) { mxGraphView view = graph.getView(); double newScale = (double) ((int) (view.getScale() * 100 * factor)) / 100; if (newScale != view.getScale() && newScale > 0.04) { mxPoint translate = (pageVisible && centerPage) ? getPageTranslate(newScale) : new mxPoint(); graph.getView().scaleAndTranslate(newScale, translate.getX(), translate.getY()); if (keepSelectionVisibleOnZoom && !graph.isSelectionEmpty()) { getGraphControl().scrollRectToVisible( view.getBoundingBox(graph.getSelectionCells()) .getRectangle()); } else { maintainScrollBar(true, factor, centerZoom); maintainScrollBar(false, factor, centerZoom); } } }
dirty = state.getView().getBoundingBox(state, false);
dirty = state.getView().getBoundingBox(state, false);