ReportCat 1.1

li.netcat.print.table
Interface TableCellDrawer

All Known Implementing Classes:
DefaultTableCellDrawer, TextTableCellDrawer

public interface TableCellDrawer

The TableCellDrawer is used to render the cells of a table. It is called drawer because it does not follow exactly the concept of java renderers. Its rather related to a Drawer.

Author:
Arthur Marxer

Method Summary
 void draw(java.awt.Graphics g, java.lang.Object value, java.lang.Object type, int x, int y, int width, int height, int rowIndex, int columnIndex)
          Draws the given value to the graphics within the given bounds.
 int getMinimumWidth(java.awt.Graphics g, java.lang.Object value, java.lang.Object type, int rowIndex, int columnIndex)
          Returns the minimum width of this cell drawer.
 int getPreferredHeight(java.awt.Graphics g, java.lang.Object value, java.lang.Object type, int rowIndex, int columnIndex, int availableWidth)
          Returns the preferred height of this cell drawer.
 int getPreferredWidth(java.awt.Graphics g, java.lang.Object value, java.lang.Object type, int rowIndex, int columnIndex)
          Returns the preferred width of this cell drawer.
 

Method Detail

getMinimumWidth

public int getMinimumWidth(java.awt.Graphics g,
                           java.lang.Object value,
                           java.lang.Object type,
                           int rowIndex,
                           int columnIndex)
Returns the minimum width of this cell drawer.

Parameters:
g - The relevant Graphics object.
value - The data value retrieved from the model.
type - The data type retrieved from the model.
rowIndex - The absolute index of the row. For a header cell, this value is defined as -1, for a footer cell, it is Integer.MAX_VALUE.
columnIndex - The index of the column.
Returns:
The preferred width of this cell drawer.

getPreferredWidth

public int getPreferredWidth(java.awt.Graphics g,
                             java.lang.Object value,
                             java.lang.Object type,
                             int rowIndex,
                             int columnIndex)
Returns the preferred width of this cell drawer. At this point, the cell drawer assumes, that the available size is infinite.

Parameters:
g - The relevant Graphics object.
value - The data value retrieved from the model.
type - The data type retrieved from the model.
rowIndex - The absolute index of the row. For a header cell, this value is defined as -1, for a footer cell, it is Integer.MAX_VALUE.
columnIndex - The index of the column.
Returns:
The preferred width of this cell drawer.

getPreferredHeight

public int getPreferredHeight(java.awt.Graphics g,
                              java.lang.Object value,
                              java.lang.Object type,
                              int rowIndex,
                              int columnIndex,
                              int availableWidth)
Returns the preferred height of this cell drawer. At this point, the cell drawer assumes, that the available height is infinite and the width of the cell will be as wide as the given width.

Parameters:
g - The relevant Graphics object.
value - The data value retrieved from the model.
type - The data type retrieved from the model.
rowIndex - The absolute index of the row. For a header cell, this value is defined as -1, for a footer cell, it is Integer.MAX_VALUE.
columnIndex - The index of the column.
availableWidth - The final available width of the cell.
Returns:
The preferred height of this cell drawer.

draw

public void draw(java.awt.Graphics g,
                 java.lang.Object value,
                 java.lang.Object type,
                 int x,
                 int y,
                 int width,
                 int height,
                 int rowIndex,
                 int columnIndex)
Draws the given value to the graphics within the given bounds.

Parameters:
g - The relevant graphics object to paint on.
value - The data value retrieved from the model.
type - The data type retrieved from the model.
x - The x coordinate of the upper left corner of the cell.
y - The y coordinate of the upper left corner of the cell.
width - The width of the cell.
height - The height of the cell.
rowIndex - The absolute index of the row. For a header cell, this value is defined as -1, for a footer cell, it is Integer.MAX_VALUE.
columnIndex - The index of the column.

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