ReportCat 1.1

li.netcat.print.table
Class DefaultTableLook

java.lang.Object
  extended byli.netcat.print.table.DefaultTableLook
All Implemented Interfaces:
TableLook

public class DefaultTableLook
extends java.lang.Object
implements TableLook

Default implementation of a table look.

Author:
Arthur Marxer

Constructor Summary
DefaultTableLook()
           
 
Method Summary
 TableMargins getTableMargins(TablePrint table, java.awt.Graphics g)
          Returns the margins of the table.
 void paint(TablePrint table, java.awt.Graphics g, int x, int y, int[] columnWidths, int[] rowHeights, int headerHeight, int footerHeight)
          Paints the whole look of the table.
 void setEvenStripeColor(java.awt.Color color)
          Sets the color of the even stripes.
 void setLineColor(java.awt.Color color)
          Sets the color of the lines.
 void setOddStripeColor(java.awt.Color color)
          Sets the color of the odd stripes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTableLook

public DefaultTableLook()
Method Detail

setLineColor

public void setLineColor(java.awt.Color color)
Sets the color of the lines.

Parameters:
color - The color of the lines.

setEvenStripeColor

public void setEvenStripeColor(java.awt.Color color)
Sets the color of the even stripes.

Parameters:
color - The color of the even stripes.

setOddStripeColor

public void setOddStripeColor(java.awt.Color color)
Sets the color of the odd stripes.

Parameters:
color - The color of the odd stripes.

getTableMargins

public TableMargins getTableMargins(TablePrint table,
                                    java.awt.Graphics g)
Description copied from interface: TableLook
Returns the margins of the table. Because TableMargins is an immutable object, this method might always return the same instance.

Specified by:
getTableMargins in interface TableLook
Parameters:
table - The table for which the margins should be calculated.
g - The relevant Graphics object.
Returns:
The margins of the table.

paint

public void paint(TablePrint table,
                  java.awt.Graphics g,
                  int x,
                  int y,
                  int[] columnWidths,
                  int[] rowHeights,
                  int headerHeight,
                  int footerHeight)
Description copied from interface: TableLook
Paints the whole look of the table. A header or footer height of -1 means that no header or footer should be painted.

Specified by:
paint in interface TableLook
Parameters:
table - The table for which the look is painted.
g - The Graphics object to paint on.
x - The x coordinate of the upper left corner of the table.
y - The y coordinate of the upper left corner of the table.
columnWidths - The column widths of the cells without the gaps of the look.
rowHeights - The row heights of the cells without the gaps of the look.
headerHeight - The height of the header. -1 means that no header is present.
footerHeight - The height of the footer. -1 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