sos.reports
Class AbstractReport.DefaultObjectElement

java.lang.Object
  |
  +--sos.reports.AbstractReport.AbstractElement
        |
        +--sos.reports.AbstractReport.AbstractObjectElement
              |
              +--sos.reports.AbstractReport.DefaultObjectElement
All Implemented Interfaces:
Element, ObjectElement, java.io.Serializable
Enclosing class:
AbstractReport

protected class AbstractReport.DefaultObjectElement
extends AbstractReport.AbstractObjectElement
implements ObjectElement

A default implementation of ObjectElement.

Instances of this class store the object and the style name.

Since:
1.0

Constructor Summary
AbstractReport.DefaultObjectElement(java.lang.Object object, java.lang.String styleName, java.lang.Object prototypeObject)
          Creates an instance of DefaultObjectElement with the specified object and style name.
 
Method Summary
 java.lang.Object getObject()
          Returns the object (or null, if none) associated with this report element.
 java.lang.Object getPrototypeObject()
          Returns this element's sample object.
protected  java.lang.String getStyleName()
          Returns the name of the style that holds this element's visual properties.
 void setObject(java.lang.Object object)
          Sets this element's object.
 
Methods inherited from class sos.reports.AbstractReport.AbstractObjectElement
getName, getNestedRootElement, getParentElement, setNestedRootElement, setParentElement
 
Methods inherited from class sos.reports.AbstractReport.AbstractElement
fireObjectChanged, getAttributes, getReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sos.reports.ObjectElement
getNestedRootElement, setNestedRootElement
 
Methods inherited from interface sos.reports.Element
getAttributes, getName, getParentElement, getReport, setParentElement
 

Constructor Detail

AbstractReport.DefaultObjectElement

public AbstractReport.DefaultObjectElement(java.lang.Object object,
                                           java.lang.String styleName,
                                           java.lang.Object prototypeObject)
Creates an instance of DefaultObjectElement with the specified object and style name.

Parameters:
object - object for which this element encapsulates (may be null)
styleName - name of the style that holds this element's visual properties (may be null)
prototypeObject - a typical object value for this element
Method Detail

getObject

public java.lang.Object getObject()
Description copied from interface: Element
Returns the object (or null, if none) associated with this report element.

Specified by:
getObject in interface Element
Overrides:
getObject in class AbstractReport.AbstractElement
Returns:
the object associated with this report element (may be null)

getPrototypeObject

public java.lang.Object getPrototypeObject()
Description copied from interface: Element
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.

Specified by:
getPrototypeObject in interface Element
Overrides:
getPrototypeObject in class AbstractReport.AbstractElement
Returns:
a prototype (may be null)
See Also:
Element.getObject()

getStyleName

protected java.lang.String getStyleName()
Description copied from class: AbstractReport.AbstractElement
Returns the name of the style that holds this element's visual properties.

Overrides:
getStyleName in class AbstractReport.AbstractElement
Returns:
this element's style name

setObject

public void setObject(java.lang.Object object)
Sets this element's object.

Parameters:
object - object for which this element encapsulates (may be null)


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