KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jcckit > transformation > Transformation


1 /*
2  * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved
3  *
4  * This library is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details
13  * (http://www.gnu.org/copyleft/lesser.html).
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package jcckit.transformation;
20
21 import jcckit.data.DataPoint;
22 import jcckit.graphic.GraphPoint;
23
24 /**
25  * Interface for transformations between data coordinates
26  * and device-independent coordinates.
27  *
28  * @author Franz-Josef Elmer
29  */

30 public interface Transformation {
31   /**
32    * Transforms a {@link DataPoint} into a {@link GraphPoint}.
33    * @param point A point in data coordinates.
34    * @return <tt>point</tt> tranformed into device-independent coordinates..
35    */

36   public GraphPoint transformToGraph(DataPoint point);
37
38   /**
39    * Transforms a {@link GraphPoint} into a {@link DataPoint}.
40    * @param point A point in device-independent coordinates..
41    * @return <tt>point</tt> tranformed into data coordinates.
42    */

43   public DataPoint transformToData(GraphPoint point);
44 }
45
Popular Tags