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

## com.bbn.openmap.tools.roads
Class Road

    java.lang.Object
      com.bbn.openmap.tools.roads.Road

All Implemented Interfaces:
  RoadObject, java.io.Serializable

public class Road
extends java.lang.Object
implements RoadObject, java.io.Serializable

See Also:
  Serialized Form

Constructor Summary
`Road(int id, java.lang.String name, Intersection from, Intersection to, RoadClass roadClass, RoadLayer roadLayer)` Create a road between two Intersections.

Method Summary
`void` | `blink(boolean newState)`
`void` | `block()`
`void` | `changeIntersection(Intersection oldIntersection, Intersection newIntersection)`
`void` | `checkPoints()`
`void` | `deleteRoadPoint(RoadPoint rp)`
`Intersection` | `getFirstIntersection()`
`int` | `getID()` Accessor for the ID property.
`float` | `getLengthInKilometers()`
`LatLonPoint` | `getLocationAtKilometer(float kilometers)`
`boolean` | `getModified()` Get the state of the modified flag.
`java.lang.String` | `getName()`
`Intersection` | `getOtherIntersection(Intersection intersection)`
`Waypoint[]` | `getPoints()`
`RoadPoint[]` | `getPointsAfter(RoadPoint wp)`
`RoadPoint[]` | `getPointsBefore(RoadPoint wp)`
`RoadClass` | `getRoadClass()`
`java.lang.String` | `getRoadClassName()`
`RoadLayer` | `getRoadLayer()`
`RoadPoint[]` | `getRoadPoints()`
`Intersection` | `getSecondIntersection()`
`float` | `getTraverseHours()`
`Waypoint` | `getWaypoint(int ix)`
`void` | `insertRoadPointAt(RoadPoint wp, int ix)`
`boolean` | `isBlocked()`
`boolean` | `isRoute()`
`void` | `isRoute(boolean yes)`
`boolean` | `isSelected()`
`void` | `moveTo(java.awt.Point loc)`
`void` | `render(OMGraphicList gl, boolean projectionIsNew)`
`void` | `setIntersections(Intersection from, Intersection to)`
`void` | `setModified(boolean newValue)` Set the state of the modified flag.
`void` | `setName(java.lang.String newName)`
`void` | `setRoadClass(RoadClass newClass)`
`void` | `setRoadPoints(RoadPoint[] innerPoints)`
`void` | `setSelected(boolean selected)`
`java.lang.String` | `toString()`
`void` | `unblock()`
`void` | `updateLines()` Mark this Road as needing a new visual representation.

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

Constructor Detail

### Road

    public Road(int id,
                java.lang.String name,
                Intersection from,
                Intersection to,
                RoadClass roadClass,
                RoadLayer roadLayer)

  Create a road between two Intersections. The detailed segments between the intersections may be filled in later.

Parameters:
  `id` - a unique, integer identifier of this road.
  `name` - a name for this road.
  `from` - the intersection from which this road leaves.
  `to` - the intersection to which this road goes.
  `roadClass` - the class of this road.
  `roadLayer` - the RoadLayer we belong to.

Method Detail

### getLengthInKilometers

    public float getLengthInKilometers()

### getTraverseHours

    public float getTraverseHours()

### getLocationAtKilometer

    public LatLonPoint getLocationAtKilometer(float kilometers)

### setModified

    public void setModified(boolean newValue)

  Set the state of the modified flag. Setting the modified flag to false also sets the modified flag of all the points to false as well.

  Parameters:
    `newValue` - the new setting.

### getModified

    public boolean getModified()

  Get the state of the modified flag.

  Returns:
    true if the road or its points have been modified.

### block

    public void block()

### unblock

    public void unblock()

### isBlocked

    public boolean isBlocked()

### blink

    public void blink(boolean newState)

  Specified by:
    `blink` in interface `RoadObject`

### getID

    public int getID()

  Accessor for the ID property.

  Returns:
    the road ID.

### getName

    public java.lang.String getName()

### setName

    public void setName(java.lang.String newName)

### getRoadClass

    public RoadClass getRoadClass()

### setRoadClass

    public void setRoadClass(RoadClass newClass)

### getRoadClassName

    public java.lang.String getRoadClassName()

### isRoute

    public void isRoute(boolean yes)

### isRoute

    public boolean isRoute()

### getRoadLayer

    public RoadLayer getRoadLayer()

### setIntersections

    public void setIntersections(Intersection from,
                                 Intersection to)

### setRoadPoints

    public void setRoadPoints(RoadPoint[] innerPoints)

### checkPoints

    public void checkPoints()

### getRoadPoints

    public RoadPoint[] getRoadPoints()

### insertRoadPointAt

    public void insertRoadPointAt(RoadPoint wp,
                                  int ix)

### deleteRoadPoint

    public void deleteRoadPoint(RoadPoint rp)

### getFirstIntersection

    public Intersection getFirstIntersection()

### getSecondIntersection

    public Intersection getSecondIntersection()

### getOtherIntersection

    public Intersection getOtherIntersection(Intersection intersection)

### changeIntersection

    public void changeIntersection(Intersection oldIntersection,
                                   Intersection newIntersection)

### getWaypoint

    public Waypoint getWaypoint(int ix)

### getPoints

    public Waypoint[] getPoints()

### getPointsBefore

    public RoadPoint[] getPointsBefore(RoadPoint wp)

### getPointsAfter

    public RoadPoint[] getPointsAfter(RoadPoint wp)

### updateLines

    public void updateLines()

  Mark this Road as needing a new visual representation.

### moveTo

    public void moveTo(java.awt.Point loc)

  Specified by:
    `moveTo` in interface `RoadObject`

### render

    public void render(OMGraphicList gl,
                       boolean projectionIsNew)

  Specified by:
    `render` in interface `RoadObject`

### toString

    public java.lang.String toString()

### isSelected

    public boolean isSelected()

### setSelected

    public void setSelected(boolean selected)

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

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details