ReportCat 1.1

li.netcat.print.util
Class DrawerPrintBorder

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

public class DrawerPrintBorder
extends java.lang.Object
implements PrintBorder

DrawerPrintBorder is a simple implementation of PrintBorder that uses two Drawers to draw the hint before and after a break.

Author:
Arthur Marxer

Constructor Summary
DrawerPrintBorder()
          Consrtucts a new DrawerPrintBorder with two LabelDrawers using the text ">>".
DrawerPrintBorder(Drawer topDrawer, Drawer bottomDrawer)
          Consrtucts a new DrawerPrintBorder using the given two Drawers.
 
Method Summary
 Drawer getBottomDrawer()
          Returns the drawer that is used to paint the bottom of an opened border.
 PrintInsets getPrintInsets(Print print, java.awt.Graphics g)
          Returns the PrintInsets for a given print.
 Drawer getTopDrawer()
          Returns the drawer that is used to paint the top of an opened border.
 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 setBottomDrawer(Drawer bottomDrawer)
          Sets the bottom drawer.
 void setTopDrawer(Drawer topDrawer)
          Sets the top drawer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawerPrintBorder

public DrawerPrintBorder()
Consrtucts a new DrawerPrintBorder with two LabelDrawers using the text ">>".


DrawerPrintBorder

public DrawerPrintBorder(Drawer topDrawer,
                         Drawer bottomDrawer)
Consrtucts a new DrawerPrintBorder using the given two Drawers.

Parameters:
topDrawer - The drawer that is used to paint the top of an opened border, can be null.
bottomDrawer - The drawer that is used to paint the bottom of an opened border, can be null.
Method Detail

getTopDrawer

public Drawer getTopDrawer()
Returns the drawer that is used to paint the top of an opened border.

Returns:
The drawer that is used to paint the top of an opened border.

setTopDrawer

public void setTopDrawer(Drawer topDrawer)
Sets the top drawer.

Parameters:
topDrawer - The drawer that is used to paint the top of an opened border.

getBottomDrawer

public Drawer getBottomDrawer()
Returns the drawer that is used to paint the bottom of an opened border.

Returns:
The drawer that is used to paint the bottom of an opened border.

setBottomDrawer

public void setBottomDrawer(Drawer bottomDrawer)
Sets the bottom drawer.

Parameters:
bottomDrawer - The drawer that is used to paint the bottom of an opened border.

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