Class StackedLayoutAPIDemoHandler

  • All Implemented Interfaces:
    DemoHandler, InternalDemoHandler

    public class StackedLayoutAPIDemoHandler
    extends AbstractDemoHandler
    A very simple JFreeReport demo. The purpose of this demo is to illustrate the basic steps required to connect a report definition with some data and display a report preview on-screen.

    In this example, the report definition is created in code. It is also possible to read a report definition from an XML file...that is demonstrated elsewhere.

    Author:
    David Gilbert
    • Constructor Detail

      • StackedLayoutAPIDemoHandler

        public StackedLayoutAPIDemoHandler()
        Creates and displays a simple report.
    • Method Detail

      • getPresentationComponent

        public JComponent getPresentationComponent()
        Description copied from interface: InternalDemoHandler
        Returns the presentation component for this demo. This component is shown before the real report generation is started. Ususally it contains a JTable with the demo data and/or input components, which allow to configure the report.
        Returns:
        the presentation component, never null.
      • createReport

        public org.pentaho.reporting.engine.classic.core.MasterReport createReport()
                                                                            throws ReportDefinitionException
        Creates a report definition.
        Returns:
        a report definition.
        Throws:
        ReportDefinitionException - if an error occured preventing the report definition.
      • getDemoName

        public String getDemoName()
        Description copied from interface: InternalDemoHandler
        Returns the display name of the demo.
        Returns:
        the name.
      • getDemoDescriptionSource

        public URL getDemoDescriptionSource()
        Description copied from interface: InternalDemoHandler
        Returns the URL of the HTML document describing this demo.
        Returns:
        the demo description.
      • main

        public static void main​(String[] args)