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

## path
Class Path

    java.lang.Object
      path.Path

    public class Path

extends java.lang.Object

This class represents a path. A path is a number of coordinates that get travelled sequencially.

Author:
  Frank Bruns

Constructor Summary
`Path()`

Method Summary
`void` | `addPoint(double x, double y)` Adds a point to the path
`java.awt.Point` | `getCurrentPoint()` Returns the current point of the path.
`java.awt.Point` | `getNextPoint()` Returns the next point in the path.
`java.util.LinkedList<java.awt.Point>` | `getPoints()` Returns the list of points of the path
`java.awt.Point` | `getPreviousPoint()` Returns the point previous to the current one of the path if there exits one, otherwise null is returned
`void` | `next()` Sets the next point of the path as the active one

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

Constructor Detail

### Path

    public Path()

Method Detail

### addPoint

    public void addPoint(double x,
                         double y)

  Adds a point to the path

  Parameters:
    `x` - x coordinate
    `y` - y coordinate

### getCurrentPoint

    public java.awt.Point getCurrentPoint()

  Returns the current point of the path. Returns null if no point is available

  Returns:
    current point of the path

### getNextPoint

    public java.awt.Point getNextPoint()

  Returns the next point in the path. If there is no next point the current point will be returned

  Returns:
    next point in the path, if available

### getPreviousPoint

    public java.awt.Point getPreviousPoint()

  Returns the point previous to the current one of the path if there exits one, otherwise null is returned

  Returns:
    point previous to the current one of the path

### getPoints

    public java.util.LinkedList<java.awt.Point> getPoints()

  Returns the list of points of the path

  Returns:
    list of points of the path

### next

    public void next()

  Sets the next point of the path as the active one

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