1 /* 2 * This file is a part of CAST project. 3 * (c) Copyright 2009, AGH University of Science & Technology 4 * https://caribou.iisg.agh.edu.pl/trac/cast 5 * 6 * Licensed under the Eclipse Public License, Version 1.0 (the "License"). 7 * You may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * http://www.eclipse.org/legal/epl-v10.html 10 */ 11 /* 12 * File: ExtendedScalableFreeformRootEditPart.java 13 * Created: 2009-03-01 14 * Author: skalkow 15 * $Id: ExtendedScalableFreeformRootEditPart.java 2489 2009-03-01 14:12:32Z skalkow $ 16 */ 17 18 package pl.edu.agh.cast.editor; 19 20 import org.eclipse.draw2d.ScalableFigure; 21 import org.eclipse.draw2d.Viewport; 22 import org.eclipse.gef.editparts.ScalableFreeformRootEditPart; 23 import org.eclipse.gef.editparts.ZoomManager; 24 25 26 /** 27 * Represents {@link ScalableFreeformRootEditPart} with own {@link ZoomManager} 28 * implementation. 29 * 30 * @author AGH CAST Team 31 */ 32 public class ExtendedScalableFreeformRootEditPart extends 33 ScalableFreeformRootEditPart { 34 35 private ZoomManager zoomManager; 36 37 /** 38 * Constructor for ScalableFreeformRootEditPart. 39 */ 40 public ExtendedScalableFreeformRootEditPart() { 41 zoomManager = new ExtendedZoomManager( 42 (ScalableFigure)getScaledLayers(), (Viewport)getFigure()); 43 } 44 45 /** {@inheritDoc} */ 46 public ZoomManager getZoomManager() { 47 return this.zoomManager; 48 } 49 50 }