Class WidgetGridComponent

  • All Implemented Interfaces:
    Serializable, org.pentaho.platform.api.engine.ILogger, org.pentaho.platform.api.ui.IUIComponent, org.pentaho.platform.api.ui.IXMLComponent

    public class WidgetGridComponent
    extends XmlComponent
    See Also:
    Serialized Form
    • Constructor Detail

      • WidgetGridComponent

        public WidgetGridComponent​(String definitionPath,
                                   org.pentaho.platform.api.engine.IPentahoUrlFactory urlFactory,
                                   List messages)
        Creates a WidgetGrid

        After creating an instance of this class validate should be called.

        Parameters:
        type - The type of the widget, currently only TYPE_DIAL is supported
        definitionPath - The path and name of the XML definition of the dial
        widgetWidth - The width of the image to be created
        widgetHeight - The height of the image to be created
        urlFactory - The urlFactory for the content
        messages - The messages list for any logger messages
    • Method Detail

      • setWidgetWidth

        public void setWidgetWidth​(int widgetWidth)
        Sets the width (in pixels) of the widget images that will be created
        Parameters:
        widgetWidth -
      • setWidgetHeight

        public void setWidgetHeight​(int widgetHeight)
        Sets the height (in pixels) of the widget images that will be created
        Parameters:
        widgetHeight -
      • setColumns

        public void setColumns​(int columns)
        Sets the number of widgets that will be dispayed in a row before another row of widgets is created
        Parameters:
        instanceId -
      • setInstanceId

        public void setInstanceId​(String instanceId)
        Sets the instance id for this execution
        Parameters:
        instanceId - The instance id of the parent object or process
      • setDataAction

        public boolean setDataAction​(String widgetGridDataDefinition)
      • setDataAction

        public void setDataAction​(String solution,
                                  String actionPath,
                                  String actionName,
                                  String actionOutput,
                                  String nameItem,
                                  String valueItem)
        Sets the action to be executed to get the data for the widgets
        Parameters:
        solution -
        actionPath -
        actionName -
        actionOutput -
        nameItem -
        valueItem -
      • setDrillUrlTemplate

        public void setDrillUrlTemplate​(String urlTemplate)
      • validate

        public boolean validate()
        Specified by:
        validate in interface org.pentaho.platform.api.ui.IUIComponent
        Specified by:
        validate in class BaseUIComponent
      • getXmlContent

        public org.dom4j.Document getXmlContent()
        Specified by:
        getXmlContent in interface org.pentaho.platform.api.ui.IXMLComponent
        Specified by:
        getXmlContent in class XmlComponent
      • createDials

        protected org.dom4j.Document createDials​(org.pentaho.commons.connection.IPentahoResultSet resultSet,
                                                 WidgetDefinition widgetDefinition)
      • createDial

        protected void createDial​(double value,
                                  String name,
                                  org.dom4j.Element root,
                                  WidgetDefinition widgetDefinition)
      • dispose

        public void dispose()
      • getActionData

        protected org.pentaho.commons.connection.IPentahoResultSet getActionData()