PaperToolkit Class Reference

List of all members.

Public Member Functions

 PaperToolkit ()
 Start up a paper toolkit.
 PaperToolkit (boolean useAppManager)
 PaperToolkit (boolean useLookAndFeel, boolean useAppManager, boolean useHandwritingRecognitionServer)
JFrame getApplicationManager ()
 Allows an end user to stop, start, and otherwise manage loaded applications.
EventEngine getEventEngine ()
 EXPERTS ONLY: Interact with the EventEngine at runtime!
String getProperty (String propertyKey)
void loadApplication (Application app)
 Adds an application to the loaded list, and displays the application manager.
void loadMostRecentPatternMappings ()
void print (Sheet sheet)
 TODO: Figure out the easiest way to send a PDF (with or without regions) to the default printer.
void startApplication (Application paperApp)
 Start this application and register all live pens with the event engine.
void stopApplication (Application paperApp)
 Remove the application and stop receiving events from its pens.
void unloadApplication (Application app)
void useApplicationManager (boolean flag)

Static Public Member Functions

static Object fromXML (File xmlFile)
 Loads an object from an XML File.
static File getPatternPath ()
static File getPenSynchDataPath ()
static File getResourceFile (String resourcePath)
 Can only point to files.
static File getToolkitRootPath ()
 Before 1.0, we will need to make sure this can work with a JAR-style deployment.
static void initializeLookAndFeel ()
 Sets up parameters for any Java Swing UI we need.
static void initializeNativeLookAndFeel ()
static void main (String[] args)
 Alternatively, try using the batch files instead.
static synchronized void runApplication (Application paperApp)
 Convenience function that uses an internal PaperToolkit object.
static void startAcrobatDesigner ()
static String toXML (Object obj)
static void toXML (Object object, File outputFile)
static void toXML (Object object, OutputStream stream)
static String toXMLNoLineBreaks (Object o)

Static Public Attributes

static final String CONFIG_FILE_KEY = "papertoolkit.startupinformation"
static final String CONFIG_FILE_VALUE = "/config/PaperToolkit.xml"
static final String CONFIG_PATTERN_PATH_KEY = "tiledpatterngenerator.patternpath"
static final String CONFIG_PATTERN_PATH_VALUE = "/pattern/"
static final File PATTERN_PATH = getPatternPath()
 Where to find the directories that store our pattern definition files.

Static Package Functions

 [static initializer]
 Print an Intro Message.

Detailed Description

Every PaperToolit has one EventEngine that handles input from users, and schedules output for the system. A PaperToolkit can run one or more Applications at the same time. You can also deactivate applications (to pause them). Or, you can remove them altogether. (These features are not yet fully implemented.)

This software is distributed under the BSD License.

TODOS:

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 111 of file PaperToolkit.java.


Constructor & Destructor Documentation

PaperToolkit (  ) 

Start up a paper toolkit.

A toolkit can load multiple applications, and dispatch events accordingly (and between applications, ideally). There will be one event engine in the paper toolkit, and all events that applications generate will be fed through this single event engine.

Definition at line 496 of file PaperToolkit.java.

Referenced by PaperToolkit.runApplication().

PaperToolkit ( boolean  useAppManager  ) 

Parameters:
useAppManager 

Definition at line 503 of file PaperToolkit.java.

PaperToolkit ( boolean  useLookAndFeel,
boolean  useAppManager,
boolean  useHandwritingRecognitionServer 
)

Parameters:
useAppManager 

Definition at line 510 of file PaperToolkit.java.

References PaperToolkit.initializeLookAndFeel(), and PaperToolkit.useApplicationManager().


Member Function Documentation

static Object fromXML ( File  xmlFile  )  [static]

Loads an object from an XML File.

Parameters:
xmlFile 
Returns:

Definition at line 174 of file PaperToolkit.java.

JFrame getApplicationManager (  ) 

Allows an end user to stop, start, and otherwise manage loaded applications.

Returns:

Definition at line 640 of file PaperToolkit.java.

Referenced by PaperToolkit.loadApplication().

EventEngine getEventEngine (  ) 

EXPERTS ONLY: Interact with the EventEngine at runtime!

Returns:

Definition at line 751 of file PaperToolkit.java.

Referenced by Application.removeSheet().

static File getPatternPath (  )  [static]

Returns:
the location of pattern data, from the configuration files.

Definition at line 187 of file PaperToolkit.java.

References PaperToolkit.CONFIG_PATTERN_PATH_KEY.

static File getPenSynchDataPath (  )  [static]

Returns:
the place where new XML files show up, when we synch our pen.

Definition at line 194 of file PaperToolkit.java.

References PaperToolkit.getToolkitRootPath().

static File getResourceFile ( String  resourcePath  )  [static]

Can only point to files.

..

Parameters:
resourcePath 
Returns:

Definition at line 204 of file PaperToolkit.java.

static File getToolkitRootPath (  )  [static]

Before 1.0, we will need to make sure this can work with a JAR-style deployment.

Currently, this does NOT work as a packaged jar.

Returns:
the root path to the toolkit (or some other canonical path where we can expect to find certain resources, like the HandwritingRecognition Server)

Definition at line 221 of file PaperToolkit.java.

Referenced by PaperToolkit.getPenSynchDataPath().

static void initializeLookAndFeel (  )  [static]

Sets up parameters for any Java Swing UI we need.

Feel free to call this from an external class. If you use the default PaperToolkit() constructor, it will also use the custom look and feel. All PaperToolkit utility classes will also use this look and feel.

Definition at line 265 of file PaperToolkit.java.

Referenced by PaperToolkit.PaperToolkit().

void loadApplication ( Application  app  ) 

Adds an application to the loaded list, and displays the application manager.

Parameters:
app 

Definition at line 1042 of file PaperToolkit.java.

References PaperToolkit.getApplicationManager(), Application.getName(), and Application.getSheets().

Referenced by PaperToolkit.startApplication().

static void main ( String[]  args  )  [static]

Alternatively, try using the batch files instead.

Parameters:
args 

Definition at line 293 of file PaperToolkit.java.

void print ( Sheet  sheet  ) 

TODO: Figure out the easiest way to send a PDF (with or without regions) to the default printer.

Parameters:
sheet 

Definition at line 1127 of file PaperToolkit.java.

static synchronized void runApplication ( Application  paperApp  )  [static]

Convenience function that uses an internal PaperToolkit object.

Parameters:
paperApp 

Definition at line 333 of file PaperToolkit.java.

References PaperToolkit.PaperToolkit(), and PaperToolkit.startApplication().

void startApplication ( Application  paperApp  ) 

Start this application and register all live pens with the event engine.

The event engine will then start dispatching events for this application until the application is stopped.

Parameters:
paperApp 

Definition at line 1167 of file PaperToolkit.java.

References Application.addPenInput(), Application.getBatchEventHandlers(), Application.getName(), Application.getPatternMaps(), Application.getPenInputDevices(), Application.initializeBeforeStarting(), PaperToolkit.loadApplication(), EventEngine.register(), BatchServer.registerBatchEventHandlers(), EventEngine.registerPatternMapsForEventHandling(), and Application.setHostToolkit().

Referenced by CalibrationCaptureApp.CalibrationCaptureApp(), and PaperToolkit.runApplication().

void stopApplication ( Application  paperApp  ) 

Remove the application and stop receiving events from its pens.

...

Parameters:
paperApp 

Definition at line 1222 of file PaperToolkit.java.

References Application.getBatchEventHandlers(), Application.getName(), Application.getPatternMaps(), Application.getPenInputDevices(), Application.setHostToolkit(), BatchServer.unregisterBatchEventHandlers(), EventEngine.unregisterPatternMapsForEventHandling(), and EventEngine.unregisterPen().

static void toXML ( Object  object,
OutputStream  stream 
) [static]

Parameters:
object 
stream write the xml to disk or another output stream.

Definition at line 376 of file PaperToolkit.java.

static void toXML ( Object  object,
File  outputFile 
) [static]

Parameters:
object 
outputFile 

Definition at line 359 of file PaperToolkit.java.

References PaperToolkit.toXML().

static String toXML ( Object  obj  )  [static]

Parameters:
obj 
Returns:
a string representing the object translated into XML

Definition at line 351 of file PaperToolkit.java.

Referenced by PaperToolkit.toXML(), and PaperToolkit.toXMLNoLineBreaks().

static String toXMLNoLineBreaks ( Object  o  )  [static]

Parameters:
o 
Returns:
an XML string representation of the object, without line breaks.

Definition at line 389 of file PaperToolkit.java.

References PaperToolkit.toXML().

void unloadApplication ( Application  app  ) 

Parameters:
app 

Definition at line 1245 of file PaperToolkit.java.

void useApplicationManager ( boolean  flag  ) 

Parameters:
flag whether or not to load the app manager when you load an application.

Definition at line 1263 of file PaperToolkit.java.

Referenced by PaperToolkit.PaperToolkit().


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:40 2007 for R3 Paper Toolkit by  doxygen 1.4.7