Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.widget.imagemap
Class CoordinateTransform

    java.lang.Object
      edu.stanford.smi.protegex.widget.imagemap.CoordinateTransform

    public class CoordinateTransform

extends Object

Takes two rectangles, does the calculations both forwards and back. Basically a simple matrix transformation that restricts itself to integers (the domain of the AWT universe). Map from coordinates in one rectangle to coordinates in another rectangle. Used in diagrams.

Author:
  William Grosso

Constructor Summary
`CoordinateTransform(Rectangle firstRect, Rectangle secondRect)`

Method Summary
`Point` | `mapPointIntoFirstRect(int xCoord, int yCoord)`
`Point` | `mapPointIntoFirstRect(Point point)`
`Point` | `mapPointIntoSecondRect(int xCoord, int yCoord)`
`Point` | `mapPointIntoSecondRect(Point point)`
`Rectangle` | `mapRectIntoFirstRect(Rectangle rectangle)`
`Rectangle` | `mapRectIntoSecondRect(Rectangle rectangle)`
`void` | `setFirstCoordinateSystem(Rectangle rectangle)`
`void` | `setFlipX(boolean flipX)`
`void` | `setFlipY(boolean flipY)`
`void` | `setSecondCoordinateSystem(Rectangle rectangle)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CoordinateTransform

    public CoordinateTransform(Rectangle firstRect,
                               Rectangle secondRect)

Method Detail

### mapPointIntoFirstRect

    public Point mapPointIntoFirstRect(int xCoord,
                                       int yCoord)

### mapPointIntoFirstRect

    public Point mapPointIntoFirstRect(Point point)

### mapPointIntoSecondRect

    public Point mapPointIntoSecondRect(int xCoord,
                                        int yCoord)

### mapPointIntoSecondRect

    public Point mapPointIntoSecondRect(Point point)

### mapRectIntoFirstRect

    public Rectangle mapRectIntoFirstRect(Rectangle rectangle)

### mapRectIntoSecondRect

    public Rectangle mapRectIntoSecondRect(Rectangle rectangle)

### setFirstCoordinateSystem

    public void setFirstCoordinateSystem(Rectangle rectangle)

### setFlipX

    public void setFlipX(boolean flipX)

### setFlipY

    public void setFlipY(boolean flipY)

### setSecondCoordinateSystem

    public void setSecondCoordinateSystem(Rectangle rectangle)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request