ReportModel
ReportModel
- Superclass
- CatModel
- Subclasses
- none
- Referenced By
- TableInterfacesSpec
This is an abstract class for creating a model with table interfaces with specific
constraints. At this moment, some constraints are specific to Caterpillar applications.
The constraints are the following:
The column labels are fixed, and there are only 4 columns.
The table interfaces can only be stacked vertically. They cannot be placed horizontally.
All entries are right-justified.
The row labels column has a fixed width of 130 pixels.
This class automatically creates the menus for graphs and detailed queries, given enough
information in the subclass.
The subclass should specify the table interfaces, the actions for filling in the values of
the tables, set up dependencies with the queries, specify the action when a table field is
double-clicked, and specify the way of opening up detailed table queries.
1. Specification of table interfaces.
Override the abstract method called initializeInterfaces. In this method, create a
collection of
ReportTableViewInformation or TotalReportTableViewInformation objects that store the
specifications
of each table interface. Return the collection.
2. Actions for filling in the values of each column.
At this moment, there are three different methods for handling this: calculateSumActual,
calculateSumBudget, and calculateSumTarget.
3. Setting up dependencies.
Set up dependencies in the method setDependencies.
Release the dependencies in the method releaseTarget.
4. Double-Click action.
Put the action in the method called doubleClicked.
5. Specify detailed query information.
Specify in the method initQueryList. For each detailed query wanted, call the method
addQuery:label:displayerClass:.
The bare minimum for the subclass to work is to override initializeInterfaces.
Instance Variables:
selectionBox <VehicleSelectionBox> The selection box for dates and vehicle selections.
formulaInfo <SQLFormulaWrapper> The object for specifying the creation of database queries.
reportValues <ReportValues> The values object that queries the database for data.
queryList <List(QueryDescription)> A list of descriptions of detailed queries.
tableInterfaces <List(TableInterface)> A list of table interfaces that were created.
tableHeight <Number> The vertical position on the window.
tableWidth <Number> The horizontal position on the window.
hasColumnLabels <Boolean> Boolean to indicate whether or not to place column labels in the first table.
haveRightOffset <Boolean> Boolean to indicate whether or not there should be extra right offset to account for a vertical scrollbar.
Class Variables:
PercentFormat <PrintConverter> The format for creating percentage format.
TableFormat <PrintConverter> The format for creating dollar format.
Developed By: Jee Ku (jku@cat.ncsa.uiuc.edu) & Joseph W. Yoder (yoder@cs.uiuc.edu)
- Potential problems with this comment:
Variable has invalid type -
#('reportValues' 'ReportValues')
Instance variable commented but not in class definition -
haveRightOffset, selectionBox
Instance variable not commented -
hasRightOffset, editorType, tableInterfaces, tableInfos