]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyHandleMouseEvent.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / proxy / ProxyHandleMouseEvent.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.g2d.element.handler.impl.proxy;
13
14 import org.simantics.g2d.canvas.ICanvasContext;
15 import org.simantics.g2d.element.IElement;
16 import org.simantics.g2d.element.handler.HandleMouseEvent;
17 import org.simantics.scenegraph.g2d.events.MouseEvent;
18
19 /**
20  * @author Toni Kalajainen
21  */
22 public class ProxyHandleMouseEvent implements HandleMouseEvent {
23
24         private static final long serialVersionUID = -7537830259701341647L;
25         HandleMouseEvent orig;
26         IProxyProvider provider;
27         
28         public ProxyHandleMouseEvent(IProxyProvider provider, HandleMouseEvent orig) {
29                 this.provider = provider;
30                 this.orig = orig;
31         }
32
33         @Override
34         public boolean handleMouseEvent(IElement e, ICanvasContext ctx, MouseEvent me) {                
35                 return orig.handleMouseEvent(provider.provide(e), ctx, me);
36         }
37         
38         
39 }