View Javadoc

1   package de.fzi.wim.guibase.graphview.lens;
2   
3   import java.awt.geom.Point2D;
4   
5   /***
6    * A lens that warps 2D space. This class has been inspired by the <a href="http://www.touchgraph.com/">TouchGraph</a> library.
7    */
8   public interface Lens {
9       /***
10       * Applies the lens to the point and modifies it according to the lens equations.
11       *
12       * @param point             the point that will be modified
13       */
14      void applyLens(Point2D point);
15      /***
16       * Undoes the lens effect on the point.
17       *
18       * @param point             the point that will be modified
19       */
20      void undoLens(Point2D point);
21      /***
22       * Adds a listener to the lens.
23       *
24       * @param listener          the listener to add
25       */
26      void addLensListener(LensListener listener);
27      /***
28       * Removes a listener from the lens.
29       *
30       * @param listener          the listener to remove
31       */
32      void removeLensListener(LensListener listener);
33  }