private void setZoom ( final double newZoom ) { if ( this.pane instanceof org.eclipse.draw2d.ScalableLayeredPane ) { this.pane.setScale ( newZoom ); } }
/** * Creates a scalable layered pane and the layers that should be scaled. * * @return a new <code>ScalableLayeredPane</code> containing the scalable * layers */ protected ScalableLayeredPane createScaledLayers() { ScalableLayeredPane layers = new ScalableLayeredPane(); layers.add(createGridLayer(), GRID_LAYER); layers.add(getPrintableLayers(), PRINTABLE_LAYERS); layers.add(new FeedbackLayer(), SCALED_FEEDBACK_LAYER); return layers; }
private ScalableLayeredPane createPane () { return new org.eclipse.draw2d.ScalableLayeredPane (); }
/** * Constructor for ScalableFreeformRootEditPart */ public ScalableRootEditPart() { zoomManager = new ZoomManager((ScalableLayeredPane) getScaledLayers(), ((Viewport) getFigure())); }