sos.reports
Interface ElementRenderer


public interface ElementRenderer

An object that controls the rendering of a report element. An ElementRenderer is used the same way a TableCellRenderer is used in a javax.swing.JTable; however, an element renderer is needed only when an element needs special formatting. For example, an element renderer is needed to display a Date object as an image of a clock, a Number object as a progress bar, or a collection of numbers as a bar chart. If no element renderer appears in a report element's attribute set, then a java.text.Format object is used to render the element as text.

Since:
1.0
See Also:
ElementEditor, ReportStyleConstants.getRenderer(javax.swing.text.AttributeSet), ReportStyleConstants.getFormat(javax.swing.text.AttributeSet)

Method Summary
 java.awt.Component getElementRendererComponent(JReportPane reportPane, Element element)
          Initializes and returns the component that renders the specified element in the specified report pane.
 

Method Detail

getElementRendererComponent

public java.awt.Component getElementRendererComponent(JReportPane reportPane,
                                                      Element element)
Initializes and returns the component that renders the specified element in the specified report pane.

Parameters:
reportPane - report pane that is preparing to render element
element - the element for which the renderer component is requested
Returns:
a component that can render element
Throws:
java.lang.NullPointerException - if reportPane or element is null


Copyright 2003, 2004 Side of Software (SOS). All rights reserved.