Class MaxCellBoundsHelper

    • Method Detail

      • getPreferredColumnWidths

        public static int[] getPreferredColumnWidths​(IConfigRegistry configRegistry,
                                                     GCFactory gcFactory,
                                                     ILayer layer,
                                                     int[] columnPositions)
        Calculates the preferred column widths of the given columns based on the given IConfigRegistry. The preferred column width is the width needed at minimum to fit all the contents horizontally.
        Parameters:
        configRegistry - The IConfigRegistry to get the required configuration values.
        gcFactory - The GCFactory for creating a temporary GC needed for UI related calculations without blocking the UI thread.
        layer - The layer to which the column positions match.
        columnPositions - The column positions for which the preferred width should be calculated.
        Returns:
        The preferred column widths of the given columns or null if an error occurred on processing.
      • getPreferredRowHeights

        public static int[] getPreferredRowHeights​(IConfigRegistry configRegistry,
                                                   GCFactory gcFactory,
                                                   ILayer layer,
                                                   int[] rowPositions)
        Calculates the preferred row heights of the given rows based on the given IConfigRegistry. The preferred row height is the height needed at minimum to fit all the content vertically.
        Parameters:
        configRegistry - The IConfigRegistry to get the required configuration values.
        gcFactory - The GCFactory for creating a temporary GC needed for UI related calculations without blocking the UI thread.
        layer - The layer to which the row positions match.
        rowPositions - The row positions for which the preferred height should be calculated.
        Returns:
        The preferred row heights of the given rows or null if an error occurred on processing.
      • greater

        public static int[] greater​(int[] array1,
                                    int[] array2)
        Traverse the two arrays and return the greater element in each index position.