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 classHighwayMatrix.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 intaddHighway(Highway highway)Creates new HighwayPtr using specifiedhighwayand adds it to the end of highway pointers list.protected voidaddToMatrix(HighwayMatrix.Cell[][] result, int newIndex)protected HighwayMatrix.Cell[][]build()protected HighwayMatrix.Cell[][]getMatrix()RoutePathgetPath(int indexFrom, org.eclipse.draw2d.geometry.Point start, int indexTo, org.eclipse.draw2d.geometry.Point end)Finds the pathHighwayremoveHighway(int index)Removes the highway pointer at the specified position in the highway pointers listprotected voidupdateMatrix(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:AbstractHighwayMatrixCreates new HighwayPtr using specifiedhighwayand adds it to the end of highway pointers list.- Specified by:
addHighwayin interfaceIHighwayMatrix- Overrides:
addHighwayin 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:AbstractHighwayMatrixRemoves the highway pointer at the specified position in the highway pointers list- Specified by:
removeHighwayin interfaceIHighwayMatrix- Overrides:
removeHighwayin 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:IHighwayMatrixFinds the path- Specified by:
getPathin 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)
-
-