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

## com.maryanovsky.gwtutils.client.geom
Interface PointView

All Known Implementing Classes:
  Point

    public interface PointView

Provides a view of an integer 2D point without allowing modifications.

Author:
  Maryanovsky Alexander

Method Summary
`boolean` | `equals(int x, int y)` Returns whether this point represents the specified coordinates.
`double` | `getDistanceFrom(PointView point)` Returns the distance from this point to the specified one.
`double` | `getDistanceFromOrigin()` Returns the distance from this point to 0,0.
`PointView` | `getDistancePoint(PointView point)` Returns the distance from this point to the specified one, as a `PointView`.
`Point` | `getDistancePoint(PointView point, Point reusable)` Returns the distance from this point to the specified one, as a `Point`.
`SizeView` | `getDistanceSize(PointView point)` Returns the distance from this point to the specified one, as a `SizeView`.
`Size` | `getDistanceSize(PointView point, Size reusable)` Returns the distance from this point to the specified one in the same manner as getDistanceSize(PointView).
`PointView` | `getOpposite()` Returns the point opposite to this one.
`Point` | `getOpposite(Point reusable)` Returns the point opposite to this one.
`int` | `getX()` Returns the X coordinate.
`int` | `getY()` Returns the Y coordinate.

Method Detail

### getX

    int getX()

  Returns the X coordinate.

### getY

    int getY()

  Returns the Y coordinate.

### getDistanceFromOrigin

    double getDistanceFromOrigin()

  Returns the distance from this point to 0,0.

### getDistanceFrom

    double getDistanceFrom(PointView point)

  Returns the distance from this point to the specified one.

### getDistancePoint

    PointView getDistancePoint(PointView point)

  Returns the distance from this point to the specified one, as a `PointView`.

### getDistancePoint

    Point getDistancePoint(PointView point,
                           Point reusable)

  Returns the distance from this point to the specified one, as a `Point`. If the specified 2nd point is not `null`, it is reused and returned.

### getDistanceSize

    SizeView getDistanceSize(PointView point)

  Returns the distance from this point to the specified one, as a `SizeView`. Note that this may differ from getDistancePoint(PointView) because the dimensions of a `SizeView` are always non-negative.

### getDistanceSize

    Size getDistanceSize(PointView point,
                         Size reusable)

  Returns the distance from this point to the specified one in the same manner as getDistanceSize(PointView). If the specified `Size` is not `null`, it is reused and returned.

### getOpposite

    PointView getOpposite()

  Returns the point opposite to this one.

### getOpposite

    Point getOpposite(Point reusable)

  Returns the point opposite to this one. If the specified reusable point is not `null`, it is reused and returned.

### equals

    boolean equals(int x,
                   int y)

  Returns whether this point represents the specified coordinates.

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