ReportCat 1.1

li.netcat.print.table
Class TableMargins

java.lang.Object
  extended byli.netcat.print.table.TableMargins

public final class TableMargins
extends java.lang.Object

This immutable class defines the margins of a table.

Author:
Arthur Marxer

Constructor Summary
TableMargins(int hGap, int vGap, int headerGap, int footerGap, int top, int left, int bottom, int right)
          Constructs and initializes a new instance of an immutable TableMargins object.
 
Method Summary
 int calculateTotalHeight(int headerHeight, int[] rowHeights, int footerHeight)
          Utility method that calculates the total height of the table.
 int calculateTotalWidth(int[] columnWidths)
          Utility method that calculates the total width of the table.
 int getBottom()
          Returns the bottom inset of the table look.
 int getFooterGap()
          Returns the gap between the footer cells and the data cells.
 int getHeaderGap()
          Returns the gap between the header cells and the data cells.
 int getHGap()
          Returns the horizontal gap between the data cells.
 int getLeft()
          Returns the left inset of the table look.
 int getRight()
          Returns the right inset of the table look.
 int getTop()
          Returns the top inset of the table look.
 int getVGap()
          Returns the vertical gap between the data cells.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableMargins

public TableMargins(int hGap,
                    int vGap,
                    int headerGap,
                    int footerGap,
                    int top,
                    int left,
                    int bottom,
                    int right)
Constructs and initializes a new instance of an immutable TableMargins object.

Parameters:
hGap - The horizontal gap between the data cells.
vGap - The vertical gap between the data cells.
headerGap - The gap between the header cells and the data cells. This gap is only considered when a header is present.
footerGap - The gap between the footer cells and the data cells. This gap is only considered when a footer is present.
top - The top inset.
left - The left inset.
bottom - The bottom inset.
right - The right inset.
Method Detail

getHGap

public int getHGap()
Returns the horizontal gap between the data cells.

Returns:
The horizontal gap between the data cells.

getVGap

public int getVGap()
Returns the vertical gap between the data cells.

Returns:
The vertical gap between the data cells.

getHeaderGap

public int getHeaderGap()
Returns the gap between the header cells and the data cells. This gap is only considered when a header is present.

Returns:
The gap between the header cells and the data cells.

getFooterGap

public int getFooterGap()
Returns the gap between the footer cells and the data cells. This gap is only considered when a footer is present.

Returns:
The gap between the footer cells and the data cells.

getTop

public int getTop()
Returns the top inset of the table look.

Returns:
The top inset of the table look.

getLeft

public int getLeft()
Returns the left inset of the table look.

Returns:
The left inset of the table look.

getBottom

public int getBottom()
Returns the bottom inset of the table look.

Returns:
The bottom inset of the table look.

getRight

public int getRight()
Returns the right inset of the table look.

Returns:
The right inset of the table look.

calculateTotalWidth

public int calculateTotalWidth(int[] columnWidths)
Utility method that calculates the total width of the table.

Parameters:
columnWidths - The widths of the columns.
Returns:
The total width of the table.

calculateTotalHeight

public int calculateTotalHeight(int headerHeight,
                                int[] rowHeights,
                                int footerHeight)
Utility method that calculates the total height of the table.

Parameters:
headerHeight - The height of the header. A negative value means that no header is present.
rowHeights - The heights of the rows. This parameter does not get modified.
footerHeight - The height of the footer. A negative value means that no footer is present.

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