|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.Application
public class Application
The R3 approach suggests that you create Application objects to wrap your entire paper + digital application. This is only ONE approach to solving the paper + digital integration, as you can actually use R3's components separately...
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.
Constructor Summary | |
---|---|
Application(java.lang.String theName)
|
Method Summary | |
---|---|
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,
java.io.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). |
java.util.List<BatchedEventHandler> |
getBatchEventHandlers()
A Paper Application needs BatchEventHandlers to detect when a person synchronizes a pen with the computer. |
DebuggingEnvironment |
getDebuggingEnvironment()
|
PaperToolkit |
getHostToolkit()
|
java.lang.String |
getName()
|
java.util.Collection<PatternLocationToSheetLocationMapping> |
getPatternMaps()
We can calculate this set at paper-application runtime, because each sheet has a reference to its pattern map. |
java.util.List<PenInput> |
getPenInputDevices()
|
java.util.List<Sheet> |
getSheets()
|
protected void |
initializeBeforeStarting()
Called right before an applications starts. |
boolean |
isRunning()
|
boolean |
isUserChoosingDestinationForPDF()
|
void |
removeAllSheets()
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. |
void |
renderToPDF()
Feel free to OVERRIDE this too. |
void |
renderToPDF(java.io.File parentDirectory,
java.lang.String fileNameWithoutExtension)
Renders all of the sheets to different PDF files... |
void |
setDebuggingEnvironment(DebuggingEnvironment debugEnvironment)
|
void |
setHostToolkit(PaperToolkit toolkit)
Set it to null when the application is not running. |
void |
setUserChoosesPDFDestinationFlag(boolean flag)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Application(java.lang.String theName)
theName
- Method Detail |
---|
public void addBatchEventHandler(BatchedEventHandler beh)
beh
- public void addDevice(Device dev)
dev
- public void addPenInput(PenInput penInputDevice)
pen
- public void addSheet(Sheet sheet)
sheet
- public void addSheet(Sheet sheet, java.io.File patternInfoFile)
sheet
- patternInfoFile
- public void addSheet(Sheet sheet, PatternLocationToSheetLocationMapping patternToSheetMapping)
sheet
- patternInfoFile
- public java.util.List<BatchedEventHandler> getBatchEventHandlers()
public DebuggingEnvironment getDebuggingEnvironment()
public PaperToolkit getHostToolkit()
public java.lang.String getName()
public java.util.Collection<PatternLocationToSheetLocationMapping> getPatternMaps()
public java.util.List<PenInput> getPenInputDevices()
public java.util.List<Sheet> getSheets()
protected void initializeBeforeStarting()
public boolean isRunning()
public boolean isUserChoosingDestinationForPDF()
public void removeAllSheets()
public void removeBatchEventHandler(BatchedEventHandler beh)
beh
- public void removeSheet(Sheet sheet)
sheet
- public void renderToPDF()
public void renderToPDF(java.io.File parentDirectory, java.lang.String fileNameWithoutExtension)
Renders all of the sheets to different PDF files... If there are four Sheets, it will make files as follows:
parentDirectory
|_fileName_1.pdf
|_fileName_2.pdf
|_fileName_3.pdf
|_fileName_4.pdf
Feel Free to OVERRIDE this method if you want to attach different behavior to the App Manager's RenderPDF Button.
public void setDebuggingEnvironment(DebuggingEnvironment debugEnvironment)
public void setHostToolkit(PaperToolkit toolkit)
toolkit
- public void setUserChoosesPDFDestinationFlag(boolean flag)
flag
- public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |