Interface PositionForAreaStrategy

    • Method Detail

      • findLabelPlacement

        MapViewPositionAndRotation findLabelPlacement​(MapViewPath path,
                                                      Rectangle2D nb)
        Finds the correct position of a label / icon inside the area.
        Parameters:
        path - The area to search in
        nb - The bounding box of the thing we are searching a place for.
        Returns:
        The position as rectangle with the same dimension as nb. null if none was found.
      • supportsGlyphVector

        boolean supportsGlyphVector()
        Checks whether this placement strategy supports more detailed (rotation / ...) placement using a glyph vector.
        Returns:
        true if it is supported.
      • forKeyword

        static PositionForAreaStrategy forKeyword​(Keyword keyword)
        Gets a strategy for the given keyword.
        Parameters:
        keyword - The text position keyword.
        Returns:
        The strategy or line if none was specified.
        Since:
        11722
      • forKeyword

        static PositionForAreaStrategy forKeyword​(Keyword keyword,
                                                  PositionForAreaStrategy defaultStrategy)
        Gets a strategy for the given keyword.
        Parameters:
        keyword - The text position keyword.
        defaultStrategy - The default if no strategy was recognized.
        Returns:
        The strategy or line if none was specified.
        Since:
        11722
      • withAddedOffset

        PositionForAreaStrategy withAddedOffset​(Point2D addToOffset)
        Create a new instance of the same strategy adding a offset
        Parameters:
        addToOffset - The offset to add
        Returns:
        The new strategy
        Since:
        12476