Class HighwayMatrix
- java.lang.Object
-
- com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
-
- com._1c.g5.v8.dt.common.gef.drow2d.HighwayMatrix
-
- All Implemented Interfaces:
IHighwayMatrix
public class HighwayMatrix extends AbstractHighwayMatrix implements IHighwayMatrix
Draft
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HighwayMatrix.Cell
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
AbstractHighwayMatrix.HighwayPtr
-
-
Constructor Summary
Constructors Constructor Description HighwayMatrix(List<Highway> highways)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addHighway(Highway highway)
Creates new HighwayPtr using specifiedhighway
and adds it to the end of highway pointers list.protected void
addToMatrix(HighwayMatrix.Cell[][] result, int newIndex)
protected HighwayMatrix.Cell[][]
build()
protected HighwayMatrix.Cell[][]
getMatrix()
RoutePath
getPath(int indexFrom, org.eclipse.draw2d.geometry.Point start, int indexTo, org.eclipse.draw2d.geometry.Point end)
Finds the pathHighway
removeHighway(int index)
Removes the highway pointer at the specified position in the highway pointers listprotected void
updateMatrix(HighwayMatrix.Cell[][] result, int dest, int src)
-
Methods inherited from class com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
getHighway, getHighwayPtr, getHighways, getIdentifier, getIndex, getPoints, getSize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.common.gef.drow2d.IHighwayMatrix
getHighway, getHighways, getIdentifier
-
-
-
-
Method Detail
-
addHighway
public int addHighway(Highway highway)
Description copied from class:AbstractHighwayMatrix
Creates new HighwayPtr using specifiedhighway
and adds it to the end of highway pointers list.- Specified by:
addHighway
in interfaceIHighwayMatrix
- Overrides:
addHighway
in classAbstractHighwayMatrix
- Parameters:
highway
- - the highway to be added to this matrix- Returns:
- the index of the highway to be added
-
removeHighway
public Highway removeHighway(int index)
Description copied from class:AbstractHighwayMatrix
Removes the highway pointer at the specified position in the highway pointers list- Specified by:
removeHighway
in interfaceIHighwayMatrix
- Overrides:
removeHighway
in classAbstractHighwayMatrix
- Parameters:
index
- - the index of the highway to be removed- Returns:
- the highway that was removed from the matrix
-
getPath
public RoutePath getPath(int indexFrom, org.eclipse.draw2d.geometry.Point start, int indexTo, org.eclipse.draw2d.geometry.Point end)
Description copied from interface:IHighwayMatrix
Finds the path- Specified by:
getPath
in interfaceIHighwayMatrix
- Parameters:
indexFrom
- the identifier of the starting highwaystart
- the start pointindexTo
- the identifier of the ending highwayend
- the end point and required direction from from this point- Returns:
- finded path
- See Also:
RoutePath
-
getMatrix
protected HighwayMatrix.Cell[][] getMatrix()
-
build
protected HighwayMatrix.Cell[][] build()
-
addToMatrix
protected void addToMatrix(HighwayMatrix.Cell[][] result, int newIndex)
-
updateMatrix
protected void updateMatrix(HighwayMatrix.Cell[][] result, int dest, int src)
-
-