ReportCat 1.1

li.netcat.print.table
Interface ColumnWidthDistributor

All Known Implementing Classes:
DefaultColumnWidthDistributor

public interface ColumnWidthDistributor

This strategy is the second step of the table cell size calculation algorithm. It distributes the available with of a table among the columns. It may use the minimum, preferred and the maximum widths of the columns and other attributes of the table to calculate the result. The first step of the calculation is done by the ColumnWidthCalculator and the third and last step is done by the RowHeightCalculator.

Author:
Arthur Marxer
See Also:
TablePrint, ColumnWidthCalculator, RowHeightCalculator

Method Summary
 int[] distribute(TablePrint table, int[] minimumWidths, int[] preferredWidths, int[] maximumWidths, int availableWidth)
          Interface of the strategy that determines how to distribute the available with of a table among the columns of the table.
 

Method Detail

distribute

public int[] distribute(TablePrint table,
                        int[] minimumWidths,
                        int[] preferredWidths,
                        int[] maximumWidths,
                        int availableWidth)
Interface of the strategy that determines how to distribute the available with of a table among the columns of the table.

Parameters:
table - The relevant TablePrint used to retrieve additional properties.
minimumWidths - This array (it's a clone and can be modified) contains the minimum width of each column of the table.
preferredWidths - This array (it's a clone and can be modified) contains the preferred width of each column of the table.
maximumWidths - This array (it's a clone and can be modified) contains the maximum width of each column of the table.
availableWidth - The available width that should be distributed among the columns. The gaps between the columns have already been substracted.
Returns:
An array of int that contains the widths of the columns. The sum of all column widths must not always be equal to the available width.

ReportCat 1.1

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation