public BaseVisualizationModel(VisualizationModel<N, E> other) { this(other.getNetwork(), other.getLayoutAlgorithm(), null, other.getLayoutSize()); }
public void scaleToLayout(ScalingControl scaler) { Dimension vd = getPreferredSize(); if (this.isShowing()) { vd = getSize(); } Dimension ld = model.getLayoutSize(); if (vd.equals(ld) == false) { scaler.scale(this, (float) (vd.getWidth() / ld.getWidth()), new Point2D.Double()); } }
private void setLtoR(VisualizationViewer<String, Integer> vv) { Dimension d = vv.getModel().getLayoutSize(); Point2D center = new Point2D.Double(d.width / 2, d.height / 2); vv.getRenderContext() .getMultiLayerTransformer() .getTransformer(Layer.LAYOUT) .rotate(-Math.PI / 2, center); }
this.vv = vv; addComponentListener(new ResizeListener()); Dimension d = vv.getModel().getLayoutSize(); verticalScrollBar = new JScrollBar(JScrollBar.VERTICAL, 0, d.height, 0, d.height); horizontalScrollBar = new JScrollBar(JScrollBar.HORIZONTAL, 0, d.width, 0, d.width);
Dimension d = vv.getModel().getLayoutSize(); Rectangle2D vvBounds = vv.getBounds();
public LayoutLensSupport(VisualizationViewer<N, E> vv) { this( vv, new HyperbolicTransformer( new Lens(vv.getModel().getLayoutSize()), vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT)), new ModalLensGraphMouse()); }
new BaseVisualizationModel<>(graph, layout2, vm1.getLayoutModel(), vm1.getLayoutSize());