TiledPatternGenerator Class Reference

List of all members.

Public Member Functions

 TiledPatternGenerator ()
 Default Pattern Path Location (PaperToolkit), automatically copied by eclipse to the export folder: PaperToolkit.
 TiledPatternGenerator (File patternPathLocation)
 Customize the location of pattern definition files.
void displayTilingInformation (Units horizontal, Units vertical)
 Prints out some information on the tiling.
PatternPackage getCurrentPatternPackage ()
TiledPattern getPattern (Units width, Units height)
 Returned pattern that is tiled appropriately, and automatically selected from the pattern package.
PatternPackage getPatternPackageByName (String name)
List< String > listAvailablePatternPackageNames ()
void resetUniquePatternTracker ()
 Resets the tracked history in this object.
void setPatternFileNumber (int num)
 Explicitly manipulate the page number which will be the source of pattern for the next call to getPattern(.

Static Public Attributes

static final String DEFAULT_PATTERN_PACKAGE_NAME = "default"
 The name of the default pattern package (stored in pattern/default/).

Detailed Description

Creates arbitrary-sized pattern blocks, assuming you have enough pattern files to supply it with.

This object keeps track of what pattern blocks you have used. It stores it in a map of each page (basically a Rectangle2D bounds). Once a request comes in that is not servicable by this SINGLE page, it will increment the patternFile Number, and allow you to get pattern from the next page.

This software is distributed under the BSD License.

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

Definition at line 28 of file TiledPatternGenerator.java.


Constructor & Destructor Documentation

TiledPatternGenerator (  ) 

Default Pattern Path Location (PaperToolkit), automatically copied by eclipse to the export folder: PaperToolkit.

This will have to change at some point, when we move to the .jar deployment.

Definition at line 84 of file TiledPatternGenerator.java.


Member Function Documentation

void displayTilingInformation ( Units  horizontal,
Units  vertical 
)

Prints out some information on the tiling.

..

Definition at line 100 of file TiledPatternGenerator.java.

References PatternPackage.getNumPatternColsPerFile(), PatternPackage.getNumPatternRowsPerFile(), and Units.getValueInPatternDots().

PatternPackage getCurrentPatternPackage (  ) 

Returns:
the current pattern package.

Definition at line 143 of file TiledPatternGenerator.java.

TiledPattern getPattern ( Units  width,
Units  height 
)

Returned pattern that is tiled appropriately, and automatically selected from the pattern package.

By default, this pattern generator class will keep track of which pattern it has given you, and will give you unique pattern (if possible) every time you call this method.

Parameters:
width the amount of pattern we need
height 
Returns:

Definition at line 158 of file TiledPatternGenerator.java.

References TiledPattern.getLastPatternFileUsed(), PatternPackage.getNumPatternColsPerFile(), PatternPackage.getNumPatternRowsPerFile(), and Units.getValueInPatternDots().

PatternPackage getPatternPackageByName ( String  name  ) 

Parameters:
name 
Returns:
a PatternPackage, indexed by name.

Definition at line 237 of file TiledPatternGenerator.java.

List<String> listAvailablePatternPackageNames (  ) 

Returns:

the set of name of available pattern packages.

Definition at line 245 of file TiledPatternGenerator.java.

void resetUniquePatternTracker (  ) 

Resets the tracked history in this object.

The next call to getPattern(...) will start over at the default state after calling this function.

Definition at line 253 of file TiledPatternGenerator.java.

Referenced by TiledPatternGenerator.setPatternFileNumber().

void setPatternFileNumber ( int  num  ) 

Explicitly manipulate the page number which will be the source of pattern for the next call to getPattern(.

..)

Parameters:
num 

Definition at line 281 of file TiledPatternGenerator.java.

References TiledPatternGenerator.resetUniquePatternTracker().


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