ReportCat 1.1

li.netcat.print.util
Class PrintInsets

java.lang.Object
  extended byli.netcat.print.util.PrintInsets

public final class PrintInsets
extends java.lang.Object

PrintInsets are similar to the java.awt.Insets with top, left, bottom and right insets. In addition, PrintInsets have a topOpened and a bottomOpened property that report the inset when the PrintInsets are broken on multiple pages.

Note that PrintInsets is an immutable class in contrast to Insets.

Author:
Arthur Marxer

Constructor Summary
PrintInsets(int top, int left, int bottom, int right, int topOpened, int bottomOpened)
          Constructs a new and immutable PrintInsets object with the given insets.
 
Method Summary
 int getBottom(boolean opened)
          Returns the inset from the bottom.
 int getBottomMax()
          Returns the maximum of the bottom insets.
 int getHeight(boolean topOpened, boolean bottomOpened)
          Returns the height of the insets.
 int getLeft()
          Returns the inset from the left.
 int getRight()
          Returns the inset from the right.
 int getTop(boolean opened)
          Returns the inset from the top.
 int getTopMax()
          Returns the maximum of the top insets.
 int getWidth()
          Returns the width of the insets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintInsets

public PrintInsets(int top,
                   int left,
                   int bottom,
                   int right,
                   int topOpened,
                   int bottomOpened)
Constructs a new and immutable PrintInsets object with the given insets.

Parameters:
top - The inset from the top.
left - The inset from the left.
bottom - The inset from the bottom.
right - The inset from the right.
topOpened - The inset from the top when this inset is displayed on the following page(s) (after a pagebreak).
bottomOpened - The inset from the bottom when this inset will be displayed on the following page(s) (before a pagebreak).
Method Detail

getTop

public int getTop(boolean opened)
Returns the inset from the top.

Parameters:
opened - Specifies, if the top (of the PrintInsets) is opened.
Returns:
The inset from the top, i.e. top or topOpened.

getTopMax

public int getTopMax()
Returns the maximum of the top insets.

Returns:
The maximum of the top insets.

getLeft

public int getLeft()
Returns the inset from the left.

Returns:
The inset from the left.

getBottom

public int getBottom(boolean opened)
Returns the inset from the bottom.

Parameters:
opened - Specifies, if the bottom is opened.
Returns:
The inset from the bottom, i.e. bottom or bottomOpened.

getBottomMax

public int getBottomMax()
Returns the maximum of the bottom insets.

Returns:
The maximum of the bottom insets.

getRight

public int getRight()
Returns the inset from the right.

Returns:
The inset from the right.

getWidth

public int getWidth()
Returns the width of the insets.

Returns:
The sum of left and right.

getHeight

public int getHeight(boolean topOpened,
                     boolean bottomOpened)
Returns the height of the insets.

Parameters:
topOpened - Specifies, if the top (of the PrintInsets) is opened.
bottomOpened - Specifies, if the bottom is opened.
Returns:
The height of the insets.

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