FreeHEP API
Version current

org.freehep.swing.print.table
Interface CellPrinter

All Known Implementing Classes:
DefaultCellPrinter

public interface CellPrinter

An interface to be implemented by cell printers

Source Code:
CellPrinter.java

Method Summary
 float getHeight(FontRenderContext frc)
          The height of one column
 float getWidth(FontRenderContext frc)
          Gets the width of the current current value.
 void print(Graphics g, Rectangle2D.Float r)
          Print this cell
 void setFont(Font fm)
          Sets the font to be used
 void setValue(Object o)
          Sets the value of the cell to print
 

Method Detail

setFont

public void setFont(Font fm)
Sets the font to be used

Parameters:
fm - The font to be used

getHeight

public float getHeight(FontRenderContext frc)
The height of one column

Parameters:
frc - The font render context to be used for calculating font sizes.
Returns:
The hieght of each column of the table

setValue

public void setValue(Object o)
Sets the value of the cell to print

Parameters:
o - The object to be printed

getWidth

public float getWidth(FontRenderContext frc)
Gets the width of the current current value.

Parameters:
frc - The font render context to be used.
Returns:
The width needed to print the current value.

print

public void print(Graphics g,
                  Rectangle2D.Float r)
Print this cell

Parameters:
g - The graphics into which to print
r -

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.