Inheritance diagram for Application:
Public Member Functions
|Application (String theName)|
|void||addBatchEventHandler (BatchedEventHandler beh)|
|void||addDevice (Device dev)|
|void||addPenInput (PenInput penInputDevice)|
|Add a digital pen (or pen simulator) for this application. |
|void||addSheet (Sheet sheet)|
|When a sheet is added to an application, we will need to determine how the pattern maps to the sheet. |
|void||addSheet (Sheet sheet, File patternInfoFile)|
|This method is better than the one argument version, because it makes everything explicit. |
|void||addSheet (Sheet sheet, PatternLocationToSheetLocationMapping patternToSheetMapping)|
|This method may be the best of the three, because you explicitly construct the patternToSheetMapping (using any method you prefer). |
|List< BatchedEventHandler >||getBatchEventHandlers ()|
|A Paper Application needs BatchEventHandlers to detect when a person synchronizes a pen with the computer. |
|Collection< PatternLocationToSheetLocationMapping >||getPatternMaps ()|
|We can calculate this set at paper-application runtime, because each sheet has a reference to its pattern map. |
|List< PenInput >||getPenInputDevices ()|
|List< Sheet >||getSheets ()|
|Useful for manipulating the application at RUNTIME. |
|void||removeBatchEventHandler (BatchedEventHandler beh)|
|void||removeSheet (Sheet sheet)|
|We can add and remove sheets before the application starts. |
|Feel free to OVERRIDE this too. |
|void||renderToPDF (File parentDirectory, String fileNameWithoutExtension)|
|void||setDebuggingEnvironment (DebuggingEnvironment debugEnvironment)|
|void||setHostToolkit (PaperToolkit toolkit)|
|Set it to null when the application is not running. |
|void||setUserChoosesPDFDestinationFlag (boolean flag)|
Protected Member Functions
|Called right before an applications starts. |
An application will consist of Bundles and Sheets, and the actions that are bound to individual regions. A PaperToolkit can load/run an Application. When an Application is running, all events will go through the PaperToolkit's EventEngine.
The Application will be able to dispatch events to the correct handlers. An application will also be able to handle pens, but these pens must be registered with the PaperToolkit to enable the event engine to do its work.
This software is distributed under the BSD License.
Definition at line 42 of file Application.java.
Add a digital pen (or pen simulator) for this application.
An application may have multiple pens.
This method may be the best of the three, because you explicitly construct the patternToSheetMapping (using any method you prefer).
Highest flexibility, but possibly inconvenient.
When a sheet is added to an application, we will need to determine how the pattern maps to the sheet.
We will create a PatternLocationToSheetLocationMapping object from this sheet.
WARNING: The current design REQUIRES you to add the sheet AFTER you have added regions to the sheet. This is an unfortunate design (ordering constraints), and should be changed _if possible_.
Alternative, we can warn when there is ambiguity in loading patternInfo files.
A Paper Application needs BatchEventHandlers to detect when a person synchronizes a pen with the computer.
In the future, this may be integrated with standard event handling on a region. Right now, this is not possible, as we need the ability to calibrate the batched coordinates (which are processed by the PAD files) with the streaming coordinates.
We can calculate this set at paper-application runtime, because each sheet has a reference to its pattern map.
We can add and remove sheets before the application starts.
However, this is also useful for manipulating the application at RUNTIME.
References PaperToolkit.getEventEngine(), Application.getHostToolkit(), Sheet.getPatternLocationToSheetLocationMapping(), Application.isRunning(), and EventEngine.unregisterPatternMapForEventHandling().
Renders all of the sheets to different PDF files... If there are four Sheets, it will make files as follows:
Feel Free to OVERRIDE this method if you want to attach different behavior to the App Manager's RenderPDF Button.
Set it to null when the application is not running.
Set it to a valid toolkit object when the application is running. This allows the application to access the toolkit object that is hosting it, during RUNTIME.