X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d.vtk%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fvtk%2Faction%2FvtkAction.java;fp=org.simantics.g3d.vtk%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fvtk%2Faction%2FvtkAction.java;h=01327c519cc577fdbb533992a13585c1bd959144;hb=84132a1d750c45f9161afbd58b78572964e50d26;hp=f95c875f3aa21c1374a9e759ed2f23c956c764bb;hpb=6308b57b2793abbd92da9e004f9f7c068f18eba6;p=simantics%2F3d.git diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/vtkAction.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/vtkAction.java index f95c875f..01327c51 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/vtkAction.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/action/vtkAction.java @@ -1,99 +1,9 @@ -/******************************************************************************* - * Copyright (c) 2012, 2013 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.g3d.vtk.action; - -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.awt.event.MouseMotionListener; - -import org.eclipse.jface.action.Action; -import org.simantics.g3d.vtk.common.InteractiveVtkPanel; - -public abstract class vtkAction extends Action implements KeyListener, MouseListener, MouseMotionListener { - - protected InteractiveVtkPanel panel; - - public vtkAction(InteractiveVtkPanel panel) { - this.panel = panel; - } - - @Override - public void run() { - panel.setActiveAction(this); - } - - - public void attach() { - - panel.addKeyListener(this); - panel.addMouseListener(this); - panel.addMouseMotionListener(this); - - } - - public void deattach() { - panel.removeKeyListener(this); - panel.removeMouseListener(this); - panel.removeMouseMotionListener(this); - } - - @Override - public void keyPressed(KeyEvent e) { - - } - - @Override - public void keyReleased(KeyEvent e) { - - } - - @Override - public void keyTyped(KeyEvent e) { - - } - - public void mouseClicked(java.awt.event.MouseEvent e) { - - }; - - @Override - public void mouseDragged(MouseEvent e) { - - } - - @Override - public void mouseEntered(MouseEvent e) { - - } - - @Override - public void mouseExited(MouseEvent e) { - - } - - @Override - public void mouseMoved(MouseEvent e) { - - } - - @Override - public void mousePressed(MouseEvent e) { - - } - - @Override - public void mouseReleased(MouseEvent e) { - - } -} +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(); +}