Bundle Class Reference

Inheritance diagram for Bundle:

PDFBundle List of all members.

Public Member Functions

 Bundle (String bundleName)
 A bunch of sheets that are related to each other in some way.
void addGlobalRegion (Region gr)
 These regions will be placed in a master list that applies to ALL sheets.
void addSheet (Sheet sheetToAdd)
void addSheets (Sheet...sheetsToAdd)
void createAndAddSheets (int numSheets, String sheetNameRoot, Units w, Units h)
 Convenience function to add a bunch of sheets to this bundle.
List< RegiongetGlobalRegions ()
String getName ()
Sheet getSheet (int index)
int getSheetNumber (Sheet s)
 Allows you to identify a sheet by its index in the list.
List< SheetgetSheets ()
 WARNING: returns the reference to the sheet.
void removeSheets (Sheet...sheetsToRemove)
 Remove all of the specified sheets.

Detailed Description

A Collection of Sheets (see Sheet.java). A collection of pages/sheets of interactive paper. A bundle contains multiple Sheets. Bundles are one of the data types that can be added to an Application.

One benefit of bundles is that they can manage page numbers... If you want to create a notebook, or multiple data sheets, you will want a bundle. In the future, we will allow adding regions to a Bundle. This means that you can have one region duplicated across sheets. Whenever a person interacts with ANY sheet in the area occupied by that region, the region's event handler will be notified.

This software is distributed under the BSD License.

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

Definition at line 26 of file Bundle.java.


Constructor & Destructor Documentation

Bundle ( String  bundleName  ) 

A bunch of sheets that are related to each other in some way.

Usually, the sheets look the same (or similar).

Definition at line 48 of file Bundle.java.


Member Function Documentation

void addGlobalRegion ( Region  gr  ) 

These regions will be placed in a master list that applies to ALL sheets.

Thus, whenever a person writes on Sheet S within the region specified by R, it will call R's event handler.

This would act like a button that is placed on every sheet (e.g., a share with group button on notebook pages).

Plus, for rendering purposes, the global region will ensure that pattern will exist on every sheet in the coordinates specified by the region.

Parameters:
r the global region to add
Deprecated:
because it is incomplete! It doesn't work yet...

Definition at line 66 of file Bundle.java.

void addSheet ( Sheet  sheetToAdd  ) 

Parameters:
sheetToAdd 

Definition at line 73 of file Bundle.java.

Referenced by Bundle.addSheets(), and Bundle.createAndAddSheets().

void addSheets ( Sheet...  sheetsToAdd  ) 

Parameters:
sheetsToAdd 

Definition at line 80 of file Bundle.java.

References Bundle.addSheet().

void createAndAddSheets ( int  numSheets,
String  sheetNameRoot,
Units  w,
Units  h 
)

Convenience function to add a bunch of sheets to this bundle.

Afterward, you can add regions to each sheet... or add global regions that span all sheets.

Parameters:
numSheets 
sheetNameRoot 

Definition at line 93 of file Bundle.java.

References Bundle.addSheet().

List<Region> getGlobalRegions (  ) 

Returns:

Definition at line 104 of file Bundle.java.

String getName (  ) 

Returns:
the name of this Bundle

Definition at line 111 of file Bundle.java.

Sheet getSheet ( int  index  ) 

Parameters:
index starting from 0
Returns:

Definition at line 120 of file Bundle.java.

int getSheetNumber ( Sheet  s  ) 

Allows you to identify a sheet by its index in the list.

Parameters:
s 
Returns:
a sheet number (starting from 0). Depends on the order in which you added the sheets. Currently, there is no facility to reorganize sheets within a bundle.

Definition at line 131 of file Bundle.java.

List<Sheet> getSheets (  ) 

WARNING: returns the reference to the sheet.

Use at your own risk! =)

Returns:

Definition at line 140 of file Bundle.java.

Referenced by BundleRenderer.renderToIndividualPDFs().

void removeSheets ( Sheet...  sheetsToRemove  ) 

Remove all of the specified sheets.

Parameters:
sheetsToRemove 

Definition at line 149 of file Bundle.java.


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