-/*******************************************************************************\r
- * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g3d.vtk.action;\r
-\r
-import java.awt.event.KeyEvent;\r
-import java.awt.event.KeyListener;\r
-import java.awt.event.MouseEvent;\r
-import java.awt.event.MouseListener;\r
-import java.awt.event.MouseMotionListener;\r
-\r
-import org.eclipse.jface.action.Action;\r
-import org.simantics.g3d.vtk.common.InteractiveVtkPanel;\r
-\r
-public abstract class vtkAction extends Action implements KeyListener, MouseListener, MouseMotionListener {\r
-\r
- protected InteractiveVtkPanel panel;\r
- \r
- public vtkAction(InteractiveVtkPanel panel) {\r
- this.panel = panel;\r
- }\r
- \r
- @Override\r
- public void run() {\r
- panel.setActiveAction(this);\r
- }\r
- \r
- \r
- public void attach() {\r
-\r
- panel.addKeyListener(this);\r
- panel.addMouseListener(this);\r
- panel.addMouseMotionListener(this);\r
-\r
- }\r
- \r
- public void deattach() {\r
- panel.removeKeyListener(this);\r
- panel.removeMouseListener(this);\r
- panel.removeMouseMotionListener(this);\r
- }\r
- \r
- @Override\r
- public void keyPressed(KeyEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void keyReleased(KeyEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void keyTyped(KeyEvent e) {\r
- \r
- }\r
- \r
- public void mouseClicked(java.awt.event.MouseEvent e) {\r
- \r
- };\r
- \r
- @Override\r
- public void mouseDragged(MouseEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void mouseEntered(MouseEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void mouseExited(MouseEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void mouseMoved(MouseEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void mousePressed(MouseEvent e) {\r
- \r
- }\r
- \r
- @Override\r
- public void mouseReleased(MouseEvent e) {\r
- \r
- }\r
-}\r
+package org.simantics.g3d.vtk.action;
+
+import org.eclipse.jface.action.Action;
+
+public abstract class vtkAction extends Action{
+
+ public abstract void attach();
+ public abstract void deattach();
+}