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
  • Constructor Details

    • HighwayMatrix

      public HighwayMatrix(List<Highway> highways)
  • Method Details

    • addHighway

      public int addHighway(Highway highway)
      Description copied from class: AbstractHighwayMatrix
      Creates new HighwayPtr using specified highway and adds it to the end of highway pointers list.
      Specified by:
      addHighway in interface IHighwayMatrix
      Overrides:
      addHighway in class AbstractHighwayMatrix
      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 interface IHighwayMatrix
      Overrides:
      removeHighway in class AbstractHighwayMatrix
      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 interface IHighwayMatrix
      Parameters:
      indexFrom - the identifier of the starting highway
      start - the start point
      indexTo - the identifier of the ending highway
      end - the end point and required direction from from this point
      Returns:
      finded path
      See Also:
    • 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)