Class RectilinearAvoidObstaclesPathFinder
java.lang.Object
com._1c.g5.v8.dt.common.gef.drow2d.RectilinearAvoidObstaclesPathFinder
- All Implemented Interfaces:
- IPathFinder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe default spacing maintained between figure and path.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Adds an obstacle with the given bounds to the obstacles.protected org.eclipse.draw2d.geometry.RectangleaddSpacing(org.eclipse.draw2d.geometry.Rectangle rect) protected IHighwayMatrixprotected voidfilterObstacles(Position pos, boolean strict) Finds the pathgetHighways(Position position, boolean strict) protected IHighwayMatrixintGets the spacing maintained between figure and path.
 Default: 10.protected booleanprotected booleanisSmallObstacle(org.eclipse.draw2d.geometry.Rectangle rect) voidremoveObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Removes the obstacle with the rectangle's bounds from the routing.protected voidvoidsetSpacing(int spacing) Sets the spacing maintained between figure and path.voidupdateObstacle(org.eclipse.draw2d.geometry.Rectangle oldBounds, org.eclipse.draw2d.geometry.Rectangle newBounds) Updates the position of an existing obstacle.
- 
Field Details- 
DEFAULT_SPACINGpublic static final int DEFAULT_SPACINGThe default spacing maintained between figure and path.- See Also:
 
 
- 
- 
Constructor Details- 
RectilinearAvoidObstaclesPathFinderpublic RectilinearAvoidObstaclesPathFinder()The empty constructor.
 
- 
- 
Method Details- 
addObstaclepublic void addObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Description copied from interface:IPathFinderAdds an obstacle with the given bounds to the obstacles.- Specified by:
- addObstaclein interface- IPathFinder
- Parameters:
- rect- the bounds of this obstacle
 
- 
removeObstaclepublic void removeObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Description copied from interface:IPathFinderRemoves the obstacle with the rectangle's bounds from the routing.- Specified by:
- removeObstaclein interface- IPathFinder
- Parameters:
- rect- the bounds of the obstacle to remove
 
- 
isSmallObstacleprotected boolean isSmallObstacle(org.eclipse.draw2d.geometry.Rectangle rect) 
- 
addSpacingprotected org.eclipse.draw2d.geometry.Rectangle addSpacing(org.eclipse.draw2d.geometry.Rectangle rect) 
- 
updateObstaclepublic void updateObstacle(org.eclipse.draw2d.geometry.Rectangle oldBounds, org.eclipse.draw2d.geometry.Rectangle newBounds) Description copied from interface:IPathFinderUpdates the position of an existing obstacle.- Specified by:
- updateObstaclein interface- IPathFinder
- Parameters:
- oldBounds- the old bounds(used to find the obstacle)
- newBounds- the new bounds
 
- 
findDescription copied from interface:IPathFinderFinds the path- Specified by:
- findin interface- IPathFinder
- Parameters:
- start- the start position
- end- the end position
- strict- the flag
- Returns:
- finded path
- See Also:
 
- 
filterObstacles
- 
restoreObstaclesprotected void restoreObstacles()
- 
isDirect
- 
getHighways
- 
getMatrix
- 
createMatrix
- 
getSpacingpublic int getSpacing()Gets the spacing maintained between figure and path.
 Default: 10.- Specified by:
- getSpacingin interface- IPathFinder
- Returns:
- the spacing maintained between figure and path.
 
- 
setSpacingpublic void setSpacing(int spacing) Sets the spacing maintained between figure and path.- Specified by:
- setSpacingin interface- IPathFinder
- Parameters:
- spacing- the spacing to set
 
 
-