ReportCat 1.1

li.netcat.print.util
Class LinePrintBorder

java.lang.Object
  extended byli.netcat.print.util.LinePrintBorder
All Implemented Interfaces:
PrintBorder

public class LinePrintBorder
extends java.lang.Object
implements PrintBorder

Implementation of a PrintBorder that draws a line as border.

Author:
Arthur Marxer

Constructor Summary
LinePrintBorder()
          Constructs a new LinePrintBorder that doesn't paint opened lines and that uses black as color and insets of 5.
LinePrintBorder(boolean paintOpenedLines, java.awt.Color color)
          Constructs a new LinePrintBorder that uses insets of 5.
 
Method Summary
 java.awt.Insets getInsets(java.awt.Insets out)
          Returns the Insets of this LinePrintBorder.
 boolean getPaintOpenedLines()
          Returns true if the opened lines will be painted.
 PrintInsets getPrintInsets(Print print, java.awt.Graphics g)
          Returns the PrintInsets for a given print.
 void paint(Print print, java.awt.Graphics g, PrintInsets margins, int x, int y, int width, int height, boolean topOpened, boolean bottomOpened)
          Paints the PrintBorder on the given graphics.
 void setInsets(java.awt.Insets insets)
          Sets the given Insets.
 void setPaintOpenedLines(boolean b)
          Specifies, whether the opened lines will be painted or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinePrintBorder

public LinePrintBorder()
Constructs a new LinePrintBorder that doesn't paint opened lines and that uses black as color and insets of 5.


LinePrintBorder

public LinePrintBorder(boolean paintOpenedLines,
                       java.awt.Color color)
Constructs a new LinePrintBorder that uses insets of 5.

Parameters:
paintOpenedLines - Specify true if opened lines (break) should be painted.
color - The color of the line.
Method Detail

setInsets

public void setInsets(java.awt.Insets insets)
Sets the given Insets.

Parameters:
insets - The new insets to be used. This parameter is copied.

getInsets

public java.awt.Insets getInsets(java.awt.Insets out)
Returns the Insets of this LinePrintBorder.

Parameters:
out - An insets object, not null.
Returns:
The modified out patameter containing the insets.

getPaintOpenedLines

public boolean getPaintOpenedLines()
Returns true if the opened lines will be painted.

Returns:
true if the opened lines will be painted.

setPaintOpenedLines

public void setPaintOpenedLines(boolean b)
Specifies, whether the opened lines will be painted or not.

Parameters:
b - Specify true to paint the opend lines.

getPrintInsets

public PrintInsets getPrintInsets(Print print,
                                  java.awt.Graphics g)
Description copied from interface: PrintBorder
Returns the PrintInsets for a given print.

Specified by:
getPrintInsets in interface PrintBorder
Parameters:
print - The print that gets the border.
g - The relevant graphics object.
Returns:
The print insets defining all insets.

paint

public void paint(Print print,
                  java.awt.Graphics g,
                  PrintInsets margins,
                  int x,
                  int y,
                  int width,
                  int height,
                  boolean topOpened,
                  boolean bottomOpened)
Description copied from interface: PrintBorder
Paints the PrintBorder on the given graphics.

Specified by:
paint in interface PrintBorder
Parameters:
print - The print that gets the border.
g - The relevant graphics object to paint on.
margins - The margins to be respected.
x - The x of the upper left corner of the PrintBorder.
y - The y of the upper left corner of the PrintBorder.
width - The total with of the border.
height - The total height of the border.
topOpened - Specifies whether the top is opened (page break) or not.
bottomOpened - Specifies whether the bottom is opened (page break) or not.

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