org.jfree.report.elementfactory
Class DrawableURLFieldElementFactory

java.lang.Object
  |
  +--org.jfree.report.elementfactory.ElementFactory
        |
        +--org.jfree.report.elementfactory.DrawableURLFieldElementFactory

public class DrawableURLFieldElementFactory
extends ElementFactory

The DrawableURLField can be used to load drawables from an URL specified in the named column of the datarow.

Author:
Thomas Morgner

Constructor Summary
DrawableURLFieldElementFactory()
          Creates a new Factory.
 
Method Summary
 Element createElement()
          Creates a new drawable field element based on the defined properties.
 java.net.URL getBaseURL()
          Returns the base url.
 java.lang.String getFieldname()
          Returns the field name from where to read the content of the element.
 void setBaseURL(java.net.URL baseURL)
          Defines a BaseURL for the new element.
 void setFieldname(java.lang.String fieldname)
          Defines the field name from where to read the content of the element.
 
Methods inherited from class org.jfree.report.elementfactory.ElementFactory
applyElementName, applyStyle, getAbsolutePosition, getDynamicHeight, getHRefTarget, getHRefWindow, getLayoutCachable, getMaximumSize, getMinimumSize, getName, getPreferredSize, getVisible, setAbsolutePosition, setDynamicHeight, setHRefTarget, setHRefWindow, setLayoutCachable, setMaximumSize, setMinimumSize, setName, setPreferredSize, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableURLFieldElementFactory

public DrawableURLFieldElementFactory()
Creates a new Factory.
Method Detail

getFieldname

public java.lang.String getFieldname()
Returns the field name from where to read the content of the element.
Returns:
the field name.

setFieldname

public void setFieldname(java.lang.String fieldname)
Defines the field name from where to read the content of the element. The field name is the name of a datarow column.
Parameters:
fieldname - the field name.

getBaseURL

public java.net.URL getBaseURL()
Returns the base url. The BaseURL is used to resolve relative URLs found in the datasource.
Returns:
the base url.

setBaseURL

public void setBaseURL(java.net.URL baseURL)
Defines a BaseURL for the new element. The BaseURL is used to resolve relative URLs found in the datasource.
Parameters:
baseURL - the base URL.

createElement

public Element createElement()
Creates a new drawable field element based on the defined properties.
Overrides:
createElement in class ElementFactory
Returns:
the generated elements
Throws:
java.lang.IllegalStateException - if the field name is not set.
See Also:
ElementFactory.createElement()