sos.reports
Interface Element

All Known Subinterfaces:
CellElement, ObjectElement, TableElement, TierElement
All Known Implementing Classes:
AbstractReport.AbstractCellElement, AbstractReport.AbstractElement, AbstractReport.AbstractObjectElement, AbstractReport.AbstractTableElement, AbstractReport.AbstractTierElement, AbstractReport.DefaultObjectElement, AbstractReport.DefaultTableElement, AbstractReport.DefaultTableElement.DefaultCellElement, AbstractReport.DefaultTableElement.DefaultTierElement

public interface Element

A hierarchical portion of a report. Each Element has a parent element, an underlying object, and a set of attributes. The parent element tells where the element resides in the enclosing report, while the set of attributes tells views how to render the underlying object.

Since:
1.0
See Also:
ObjectElement, TableElement

Method Summary
 javax.swing.text.AttributeSet getAttributes()
          Returns the set of attributes describing this report element.
 java.lang.String getName()
          Returns the name of this report element.
 java.lang.Object getObject()
          Returns the object (or null, if none) associated with this report element.
 Element getParentElement()
          Returns this element's parent.
 java.lang.Object getPrototypeObject()
          Returns this element's sample object.
 Report getReport()
          Returns the report to which this element belongs.
 void setParentElement(Element parent)
          Sets this element's parent.
 

Method Detail

getAttributes

public javax.swing.text.AttributeSet getAttributes()
Returns the set of attributes describing this report element.

Returns:
the set of attributes describing this report element (may not be null)

getName

public java.lang.String getName()
Returns the name of this report element.

Returns:
this element's name

getObject

public java.lang.Object getObject()
Returns the object (or null, if none) associated with this report element.

Returns:
the object associated with this report element (may be null)

getParentElement

public Element getParentElement()
Returns this element's parent.

Returns:
the parent element of this report element (may be null)

getPrototypeObject

public java.lang.Object getPrototypeObject()
Returns this element's sample object. The returned object may be used by views, for example, to calculate minimum and preferred sizes when this element's underlying object is null.

Returns:
a prototype (may be null)
See Also:
getObject()

getReport

public Report getReport()
Returns the report to which this element belongs.

Returns:
the report overseeing this element

setParentElement

public void setParentElement(Element parent)
Sets this element's parent.

Parameters:
parent - parent element
Throws:
java.lang.UnsupportedOperationException - if this element does not allow the setting of its parent
See Also:
getParentElement()


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