| org.pentaho.ui.XmlComponent org.pentaho.ui.component.DashboardWidgetComponent
DashboardWidgetComponent | public class DashboardWidgetComponent extends XmlComponent (Code) | | This class is a Pentaho user interface component. It generates dial
images that can be embedded into JSPs, portals or other HTML supporting user
interface.
- The creating object sets the width, height, the type of the dial, and
the name of the dial.xml file that contains the definition of the dial.
- This class creates an instance of a DialWidgetDefinition using the
specified XML definition file. The XML files are located in the solution
folders and have .dial.xml extenstions. The dial XML files define the
attributes that define how the dial looks.
- It uses the JFreeChartEngine to create an image of the dial.
- Once the image has been created this class creates an XML document
describing the dial
- It uses an XSL to tranforms the XML description into HTML.
This is an example image
|
TYPE_DIAL | final public static int TYPE_DIAL(Code) | | |
TYPE_THERMOMETER | final public static int TYPE_THERMOMETER(Code) | | |
DashboardWidgetComponent | public DashboardWidgetComponent(int type, String definitionPath, int width, int height, IPentahoUrlFactory urlFactory, List messages)(Code) | | Creates a DashboardWidgetComponent.
After creating an instance of this class validate should
be called.
Parameters: type - The type of the widget, currently only TYPE_DIAL is supported Parameters: definitionPath - The path and name of the XML definition of the dial Parameters: width - The width of the image to be created Parameters: height - The height of the image to be created Parameters: urlFactory - The urlFactory for the content Parameters: messages - The messages list for any logger messages |
dispose | public void dispose()(Code) | | |
getLogger | public Log getLogger()(Code) | | Gets the logger for his component.
logger This component's logger |
getXmlContent | public Document getXmlContent()(Code) | | Create a dial image.
- Load the specified XML document describing the dial definition
- Create a dial definition object from the XML definition
- Use the JFreeChartEngine to create a dial image
- Create an XML document describing the dial
- Return the XML document
The XML document describing this dial |
setTitle | public void setTitle(String title)(Code) | | Sets the title for the dial
Parameters: title - The title of the dial |
setUnits | public void setUnits(String units)(Code) | | Sets the unit for the dial value
Parameters: units - The dial units |
setValue | public void setValue(double value)(Code) | | Sets the value to be displayed by the dial.
Parameters: value - The dial value |
validate | public boolean validate()(Code) | | Validate that this component can generate the requested dial
|
|
|