Class ReportConfigurator

java.lang.Object
ca.spatial.reportwriter.ReportConfigurator
Direct Known Subclasses:
BoxAndWhiskerChartReportConfigurator, CategoryCategoryReportConfigurator, CategoryExpressionReportConfigurator, CategoryPatternReportConfigurator, CategoryReportConfigurator, ColumnSummaryReportConfigurator, CompareReportConfigurator, IndexReportConfigurator, MapReportConfigurator, PeriodCategoryReportConfigurator, PeriodExpressionReportConfigurator, PeriodPatternReportConfigurator, PeriodValueReportConfigurator, PivotTableReportConfigurator, RangePeriodReportConfigurator, RasterRemapReportConfigurator, StandardReportConfigurator, TableQueryReportConfigurator, TargetLimitReportConfigurator, TargetReportConfigurator, TargetStatusReportConfigurator, TextReportConfigurator

public abstract class ReportConfigurator extends Object
This abstract class defines methods that construct a report configuration wizard. This is used by the AddReportWizard class. Every report that will be added to the AddReportWizard must implement a subclass of this configurator. Add these configurators to the report writer using the addKnownReport method.
  • Constructor Details

    • ReportConfigurator

      public ReportConfigurator()
  • Method Details

    • getConfigurator

      public abstract WizardPane getConfigurator(Wizard wiz, ReportWriter rw, Report report)
      Return a chain of WizardPane's that obtain report configuration information. Completing the wizard should result in the wizard adding a report to the specified report writer.

      ReportConfigurator's need to be deployed by adding them to the ReportWriter using the ReportWriter.addKnownReport(java.lang.String, ca.spatial.reportwriter.ReportConfigurator) method. This is usually done within the main application startup class, but can also be done from the Patchworks console. Once the configurator is made to be 'known', the GUI can then present the report name in menus where new reports can be created.

      See the StandardReportConfigurator for an example of how to compose report configurators.

      Parameters:
      wiz - The wizard to embed the configurator into.
      rw - The ReportWriter that contains the report.
      report - The report that is to be modified. If this parameter is null then a new report will be instantiated.
      Returns:
      A chain of WizardPane objects that contain all of the configuration parameters supported by the report.
    • getDescription

      public abstract String getDescription()
      Return an HTML formatted string that describes the purpose of this report.
    • getTypes

      public abstract String[] getTypes()
      Return an array of strings that list the possible extensions for this report. Some reports can display their contents as HTML, CSV, or GIF. Return null if only a single extension is to be hardcoded into the report name.
    • getReportClass

      public abstract Class getReportClass()
    • getCategory

      public String getCategory()
      The category is used to group reports by name in the "Add Report Wizard".
    • getNameAndTitle

      public static WizardPane getNameAndTitle(Wizard wiz, ReportWriter rw, Report report)
      Return a panel that prompts for the report title and name. These values are stored in the Wizard spellbook under "title" and "name".
    • getAttributeStore

      public static WizardPane getAttributeStore(Wizard wiz, AttributeStore init)
      Present a panel that prompts for an existing (already opened) AttributeStore.
    • getStoreAndReselect

      public static WizardPane getStoreAndReselect(Wizard wiz, AttributeStore init, String resel)
      Present a panel that prompts for an existing (already opened) AttributeStore and a reselection expression.
    • getPeriodList

      public static WizardPane getPeriodList(Wizard wiz, int[] periods)
    • getAdditionalHTML

      public static WizardPane getAdditionalHTML(Wizard wiz, String html, ReportWriter rw)
    • getUnitsAndPerct

      public static WizardPane getUnitsAndPerct(Wizard wiz, String units, boolean annualize, boolean percent, boolean doRowTotals, boolean doColumnTotals, boolean doSubTotals, boolean noChart, boolean noTable, Integer maxFractionDigits)
    • getPatternCombo

      public static WizardPane getPatternCombo(Wizard wiz, String pattern, boolean wildcard)
    • getExpressionList

      public static WizardPane getExpressionList(Wizard wiz, String[] expressions, String[] labels, int minCount)
    • getColumnsAndLabels

      public static WizardPane getColumnsAndLabels(Wizard wiz, String var, String tableVar, String categoryColumn, String[] columns, String[] labels)
    • getBwData

      public static WizardPane getBwData(Wizard wiz, String var, String labelVar, String[] labels, double[][] bwData)
    • getCellValueExpression

      public static WizardPane getCellValueExpression(Wizard wiz, String valueExpression)
    • getNumericCellExpression

      public static WizardPane getNumericCellExpression(Wizard wiz, String valueExpression, String title, String name, String label)
    • getCategoryExpressionAndValues

      public static WizardPane getCategoryExpressionAndValues(Wizard wiz, String categoryExpression, Comparable[] categories, String title, String group)
    • adjustDbfSpecs

      public static WizardPane adjustDbfSpecs(Wizard wiz, AttributeStore as, ArrayList<DBFColumnSpec> defs, String var, boolean dbf)
    • getDbfSpecs

      public static ArrayList<DBFColumnSpec> getDbfSpecs(Wizard wiz, String var)
    • scanUniqueLabels

      public static void scanUniqueLabels(String query, AttributeStore as, RamAttributeStore ct, int defPeriod, Window parent)
    • getFileName

      public static String getFileName(Wizard wiz)
    • getExpressions

      public static String[] getExpressions(Wizard wiz, String item)
    • getLabels

      public static String[] getLabels(Wizard wiz, String item)
    • getCategories

      public static Comparable[] getCategories(Wizard wiz, String group)
    • getPeriods

      public static int[] getPeriods(Wizard wiz, String item)
    • getGeneralReportSteps

      public static WizardPane getGeneralReportSteps(Wizard wiz, ReportWriter rw, GeneralReport rpt, boolean getStore)
    • updateGeneralOptions

      public static void updateGeneralOptions(GeneralReport gr, Wizard wiz)