Class SortByLinesOperator

    • Constructor Detail

      • SortByLinesOperator

        public SortByLinesOperator()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Service
        Obtains a descriptive name of the service that may be presented to the user.
        Specified by:
        getName in interface Service
        Overrides:
        getName in class SortByPositionOperator
        Returns:
        the operator name
      • recursiveSortLines

        protected void recursiveSortLines​(Area root)
        Goes through all the areas in the tree and sorts their sub-areas.
      • sortChildLines

        protected void sortChildLines​(Area root)
        Goes through the grid of areas and sorts the adjacent visual areas that are not separated by anything
      • isOnSameLine

        protected boolean isOnSameLine​(Area a1,
                                       Area a2,
                                       int threshold)
        Checks if the given areas are on the same line.
        Parameters:
        a1 -
        a2 -
        Returns: