|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.vpf.VPFLayer com.bbn.openmap.layer.vpf.VPFRoadLayer
public class VPFRoadLayer
Imposes a road layer on the VPF 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, 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.vpf.VPFLayer |
---|
ConfigCmd, configWindowSupport, coverageType, coverageTypeProperty, cutoffScale, cutoffScaleProperty, dataPaths, defaultLayerProperty, featureTypesProperty, libraryBeanName, libraryName, LibraryNameProperty, libraryProperty, lst, pathProperty, prefix, props, searchByFeatureProperty, searchByFeatures, warehouse |
Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer |
---|
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, layerWorkerQueue, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty |
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 | |
---|---|
VPFRoadLayer()
|
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()
Gets the original list of graphics items from getRectangle. |
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. |
OMGraphicList |
prepare()
Creates an OMGraphicList containing graphics from all SpatialIndex objects and shapefiles. |
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)
Another way to set the parameters of the DcwLayer. |
Methods inherited from class com.bbn.openmap.layer.vpf.VPFLayer |
---|
actionPerformed, checkWarehouse, computeLayer, getAreasEnabled, getCPointsEnabled, getDataTypes, getDrawingAttributes, getEdgesEnabled, getEPointsEnabled, getGUI, getInfoText, getPath, getProperties, getRectangle, getTextEnabled, getToolTipTextFor, getWarehouse, initLST, setAreasEnabled, setConfigSettings, setCPointsEnabled, setDataTypes, setDrawingAttributes, setEdgesEnabled, setEPointsEnabled, setFeatures, setPath, setPath, setTextEnabled, setWarehouse |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 java.beans.beancontext.BeanContextChild |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
public static final java.lang.String DrawIntersectionsProperty
public static final java.lang.String DrawResultsProperty
Constructor Detail |
---|
public VPFRoadLayer()
Method Detail |
---|
public void setProperties(java.lang.String prefix, java.util.Properties props)
VPFLayer
setProperties
in interface PropertyConsumer
setProperties
in class VPFLayer
prefix
- the token to prefix the property namesprops
- the Properties
objectVPFLayer.pathProperty
,
VPFLayer.coverageTypeProperty
,
VPFLayer.featureTypesProperty
protected void setDrawIntersections(boolean val)
protected void setDrawResults(boolean val)
protected void setHelper()
public java.util.List getPathOnRoad(java.awt.Point start, java.awt.Point end, java.util.List segments)
getPathOnRoad
in interface RoadServices
start
- from hereend
- to theresegments
- populated with road segments
public Route getPathOnRoad(LatLonPoint start, LatLonPoint end)
RoadServices
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.
getPathOnRoad
in interface RoadServices
start
- - Start point in latitude/longitude coordinates.end
- - End point in latitude/longitude coordinates.
RoadServices.getPathOnRoad(LatLonPoint, LatLonPoint)
public java.util.List displayPathOnRoad(java.awt.Point start, java.awt.Point end, Route route, java.util.List segments)
RoadServices
displayPathOnRoad
in interface RoadServices
start
- start from start point on mapend
- to end point on maproute
- the Route to travel from start to endsegments
- as side effect, populated with PathSegments
between returned WayPoints
RoadServices.displayPathOnRoad(Point, Point, Route, List)
public RoadServices getRoadServices()
public void projectionChanged(ProjectionEvent e)
projectionChanged
in interface ProjectionListener
projectionChanged
in class OMGraphicHandlerLayer
e
- ProjectionEventProjectionChangePolicy
,
StandardPCPolicy
,
ListResetPCPolicy
public void setExtraGraphics(java.util.List toDraw)
setExtraGraphics
in interface LayerView
public void paint(java.awt.Graphics g)
paint
in class OMGraphicHandlerLayer
g
- java.awt.Graphics object to render OMGraphics into.public OMGraphicList prepare()
prepare
in class VPFLayer
public java.util.List getGraphicList()
getGraphicList
in interface LayerView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |