Package ca.spatial.reportwriter
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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WizardPane
adjustDbfSpecs(Wizard wiz, AttributeStore as, ArrayList<DBFColumnSpec> defs, String var, boolean dbf)
static WizardPane
getAdditionalHTML(Wizard wiz, String html, ReportWriter rw)
static WizardPane
getAttributeStore(Wizard wiz, AttributeStore init)
Present a panel that prompts for an existing (already opened) AttributeStore.static WizardPane
static Comparable[]
getCategories(Wizard wiz, String group)
The category is used to group reports by name in the "Add Report Wizard".static WizardPane
getCategoryExpressionAndValues(Wizard wiz, String categoryExpression, Comparable[] categories, String title, String group)
static WizardPane
getCellValueExpression(Wizard wiz, String valueExpression)
static WizardPane
getColumnsAndLabels(Wizard wiz, String var, String tableVar, String categoryColumn, String[] columns, String[] labels)
abstract WizardPane
getConfigurator(Wizard wiz, ReportWriter rw, Report report)
Return a chain of WizardPane's that obtain report configuration information.static ArrayList<DBFColumnSpec>
getDbfSpecs(Wizard wiz, String var)
abstract String
Return an HTML formatted string that describes the purpose of this report.static WizardPane
getExpressionList(Wizard wiz, String[] expressions, String[] labels, int minCount)
static String[]
getExpressions(Wizard wiz, String item)
static String
getFileName(Wizard wiz)
static WizardPane
getGeneralReportSteps(Wizard wiz, ReportWriter rw, GeneralReport rpt, boolean getStore)
static String[]
static WizardPane
getNameAndTitle(Wizard wiz, ReportWriter rw, Report report)
Return a panel that prompts for the report title and name.static WizardPane
getNumericCellExpression(Wizard wiz, String valueExpression, String title, String name, String label)
static WizardPane
getPatternCombo(Wizard wiz, String pattern, boolean wildcard)
static WizardPane
getPeriodList(Wizard wiz, int[] periods)
static int[]
getPeriods(Wizard wiz, String item)
abstract Class
static WizardPane
getStoreAndReselect(Wizard wiz, AttributeStore init, String resel)
Present a panel that prompts for an existing (already opened) AttributeStore and a reselection expression.abstract String[]
getTypes()
Return an array of strings that list the possible extensions for this report.static WizardPane
getUnitsAndPerct(Wizard wiz, String units, boolean annualize, boolean percent, boolean doRowTotals, boolean doColumnTotals, boolean doSubTotals, boolean noChart, boolean noTable, Integer maxFractionDigits)
static void
scanUniqueLabels(String query, AttributeStore as, RamAttributeStore ct, int defPeriod, Window parent)
static void
updateGeneralOptions(GeneralReport gr, Wizard wiz)
-
Constructor Details
-
ReportConfigurator
public ReportConfigurator()
-
-
Method Details
-
getConfigurator
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
- TheReportWriter
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
Return an HTML formatted string that describes the purpose of this report. -
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
-
getCategory
The category is used to group reports by name in the "Add Report Wizard". -
getNameAndTitle
Return a panel that prompts for the report title and name. These values are stored in the Wizard spellbook under "title" and "name". -
getAttributeStore
Present a panel that prompts for an existing (already opened) AttributeStore. -
getStoreAndReselect
Present a panel that prompts for an existing (already opened) AttributeStore and a reselection expression. -
getPeriodList
-
getAdditionalHTML
-
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
-
getExpressionList
public static WizardPane getExpressionList(Wizard wiz, String[] expressions, String[] labels, int minCount) -
getColumnsAndLabels
-
getBwData
public static WizardPane getBwData(Wizard wiz, String var, String labelVar, String[] labels, double[][] bwData) -
getCellValueExpression
-
getNumericCellExpression
-
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
-
scanUniqueLabels
public static void scanUniqueLabels(String query, AttributeStore as, RamAttributeStore ct, int defPeriod, Window parent) -
getFileName
-
getExpressions
-
getLabels
-
getCategories
-
getPeriods
-
getGeneralReportSteps
public static WizardPane getGeneralReportSteps(Wizard wiz, ReportWriter rw, GeneralReport rpt, boolean getStore) -
updateGeneralOptions
-