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.layer.shape
Class MultiRoadLayer

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  com.bbn.openmap.Layer
                      com.bbn.openmap.layer.OMGraphicHandlerLayer
                          com.bbn.openmap.layer.shape.ShapeLayer
                              com.bbn.openmap.layer.shape.MultiShapeLayer
                                  com.bbn.openmap.layer.shape.MultiRoadLayer

All Implemented Interfaces:
  java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, DataBoundsProvider, java.util.EventListener, GestureResponsePolicy, java.awt.image.ImageObserver, LayerView, java.awt.MenuContainer, ProjectionListener, ProjectionPainter, PropertyConsumer, RoadServices, java.io.Serializable

public class MultiRoadLayer
extends MultiShapeLayer
implements RoadServices, ProjectionListener, LayerView

Imposes a road layer on the multi shape layer. The important method here is getPathOnRoad(implemented for the RoadServices interface) which returns a list of points on the road found between a start and an end point. You can see more about what the road layer is doing by setting drawIntersections to true, which will reveal what the road finder thinks are roads on the road layer, and drawResults to true, which will show each road path request and its result. The results shown accumulate over time.

See Also:
  `RoadServices`, Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`static java.lang.String` | `DrawIntersectionsProperty` Property 'drawIntersections' will display the intersections on the road layer False by default.
`static java.lang.String` | `DrawResultsProperty` Property 'drawResults' will display the results of each road request on the road layer False by default.

Fields inherited from class com.bbn.openmap.layer.shape.MultiShapeLayer
`ShapeFileListProperty, spatialIndexes`

Fields inherited from class com.bbn.openmap.layer.shape.ShapeLayer
`box, coordTransform, drawingAttributes, pointImageURLProperty, shadowX, shadowXProperty, shadowY, shadowYProperty, shapeFileProperty, spatialIndex, spatialIndexProperty, TransformProperty`

Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
`consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty`

Fields inherited from class com.bbn.openmap.Layer
`addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, windowSupport`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`MultiRoadLayer()`

Method Summary
`java.util.List` | `displayPathOnRoad(java.awt.Point start, java.awt.Point end, Route route, java.util.List segments)` Displays a Route between two points on the map.
`java.util.List` | `getGraphicList()` Flattens nested OMGraphicLists of lists into one level list of OMGraphic items.
`Route` | `getPathOnRoad(LatLonPoint start, LatLonPoint end)` Returns the best Route between a start point and end point.
`java.util.List` | `getPathOnRoad(java.awt.Point start, java.awt.Point end, java.util.List segments)` Get points on the road between start and end Implemented for the RoadService interface
`RoadServices` | `getRoadServices()` Returns the RoadServices instance.
`void` | `paint(java.awt.Graphics g)` If drawIntersections or drawResults is true, will add intersection markers or returned road lines to what is rendered.
`void` | `projectionChanged(ProjectionEvent e)` Implemented for ProjectionListener
`protected void` | `setDrawIntersections(boolean val)`
`protected void` | `setDrawResults(boolean val)`
`void` | `setExtraGraphics(java.util.List toDraw)` Called from RoadFinder to tell it what extra to render (e.g.
`protected void` | `setHelper()`
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Initializes this layer from the given properties.

Methods inherited from class com.bbn.openmap.layer.shape.MultiShapeLayer
`getDataBounds, getGUI, getProperties, getPropertyInfo, getSpatialIndexes, prepare, setFileProperties, setSpatialIndexes, setSpatialIndexes`

Methods inherited from class com.bbn.openmap.layer.shape.ShapeLayer
`actionPerformed, computeGraphics, getCoordTransform, getDrawingAttributes, getInfoText, getSpatialIndex, getToolTipTextFor, removed, setCoordTransform, setDrawingAttributes, setSpatialIndex`

Methods inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
`canSetList, copy, createLayerWorker, cut, deselect, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMapMouseListener, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getRenderPolicy, getSelected, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isHighlightable, isInterruptable, isSelectable, isWorking, leftClick, mouseOver, paste, receivesMapEvents, renderDataForProjection, resetFiltering, select, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setRenderPolicy, setTransparency, supportsSQL, unhighlight, workerComplete`

Methods inherited from class com.bbn.openmap.Layer
`addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, finalize, findAndInit, findAndInit, findAndUndo, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, putAttribute, removeComponentListener, removeConfirmed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, resetPalette, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setIcon, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setVisible, setWindowSupport, showPalette`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

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

Methods inherited from interface com.bbn.openmap.tools.roads.LayerView
`getProjection`

Methods inherited from interface com.bbn.openmap.util.DataBoundsProvider
`getName`

Methods inherited from interface java.beans.beancontext.BeanContextChild
`addPropertyChangeListener, removePropertyChangeListener`

Field Detail

### DrawIntersectionsProperty

    public static final java.lang.String DrawIntersectionsProperty

  Property 'drawIntersections' will display the intersections on the road layer False by default.

  See Also:
    Constant Field Values

### DrawResultsProperty

    public static final java.lang.String DrawResultsProperty

  Property 'drawResults' will display the results of each road request on the road layer False by default.

  See Also:
    Constant Field Values

Constructor Detail

### MultiRoadLayer

    public MultiRoadLayer()

Method Detail

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties props)

  Description copied from class: `ShapeLayer`
  Initializes this layer from the given properties.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `ShapeLayer`
  Parameters:
    `props` - the `Properties` holding settings for this layer

### setDrawIntersections

    protected void setDrawIntersections(boolean val)

### setDrawResults

    protected void setDrawResults(boolean val)

### setHelper

    protected void setHelper()

### getPathOnRoad

    public java.util.List getPathOnRoad(java.awt.Point start,
                                        java.awt.Point end,
                                        java.util.List segments)

  Get points on the road between start and end Implemented for the RoadService interface

  Specified by:
    `getPathOnRoad` in interface `RoadServices`
  Parameters:
    `start` - from here
    `end` - to there
    `segments` - populated with road segments
  Returns:
    list of points on path

### getPathOnRoad

    public Route getPathOnRoad(LatLonPoint start,
                               LatLonPoint end)

  Description copied from interface: `RoadServices`
  Returns the best Route between a start point and end point.

  This method works by finding the closest intersection to start and end points, and then finding a path from start intersection to end intersection. The method works in latitude/longitude coordinates.

  Specified by:
    `getPathOnRoad` in interface `RoadServices`
  Parameters:
    `start` - - Start point in latitude/longitude coordinates.
    `end` - - End point in latitude/longitude coordinates.
  Returns:
    the best route to travel by Road from start to end
  See Also:
    `RoadServices.getPathOnRoad(com.bbn.openmap.LatLonPoint, com.bbn.openmap.LatLonPoint)`

### displayPathOnRoad

    public java.util.List displayPathOnRoad(java.awt.Point start,
                                            java.awt.Point end,
                                            Route route,
                                            java.util.List segments)

  Description copied from interface: `RoadServices`
  Displays a Route between two points on the map.

  Specified by:
    `displayPathOnRoad` in interface `RoadServices`
  Parameters:
    `start` - start from start point on map
    `end` - to end point on map
    `route` - the Route to travel from start to end
    `segments` - as side effect, populated with PathSegments between returned WayPoints
  Returns:
    List of WayPoints
  See Also:
    `RoadServices.displayPathOnRoad(java.awt.Point, java.awt.Point, com.bbn.openmap.tools.roads.Route, java.util.List)`

### getRoadServices

    public RoadServices getRoadServices()

  Returns the RoadServices instance.

  Returns:
    the RoadServices instance.

### projectionChanged

    public void projectionChanged(ProjectionEvent e)

  Implemented for ProjectionListener

  Specified by:
    `projectionChanged` in interface `ProjectionListener`
  Overrides:
    `projectionChanged` in class `OMGraphicHandlerLayer`
  See Also:
    `ProjectionChangePolicy`, `StandardPCPolicy`, `ListResetPCPolicy`

### getGraphicList

    public java.util.List getGraphicList()

  Flattens nested OMGraphicLists of lists into one level list of OMGraphic items. Gets the original list of graphics items from getList.

  Specified by:
    `getGraphicList` in interface `LayerView`
  Returns:
    List of OMGraphic items that will be used to create roads

### setExtraGraphics

    public void setExtraGraphics(java.util.List toDraw)

  Called from RoadFinder to tell it what extra to render (e.g. intersections, roads).

  Specified by:
    `setExtraGraphics` in interface `LayerView`

### paint

    public void paint(java.awt.Graphics g)

  If drawIntersections or drawResults is true, will add intersection markers or returned road lines to what is rendered.

  Overrides:
    `paint` in class `ShapeLayer`
  Parameters:
    `g` - a graphics context

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