li.netcat.print.table
Class DefaultColumnWidthDistributor
java.lang.Object
li.netcat.print.table.DefaultColumnWidthDistributor
- All Implemented Interfaces:
- ColumnWidthDistributor
- public class DefaultColumnWidthDistributor
- extends java.lang.Object
- implements ColumnWidthDistributor
This is a default implementation of the ColumnWidthDistributor
that uses the weights of the column
to distribute the rest of the width, with respect to the preferred widths.
- Author:
- Arthur Marxer
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultColumnWidthDistributor
public DefaultColumnWidthDistributor()
distribute
public int[] distribute(TablePrint table,
int[] minimumWidths,
int[] preferredWidths,
int[] maximumWidths,
int availableWidth)
- Description copied from interface:
ColumnWidthDistributor
- Interface of the strategy that determines how to distribute the available with of a table among the columns of the table.
- Specified by:
distribute
in interface ColumnWidthDistributor
- 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.
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