edu.stanford.hci.r3.pattern
Class TiledPattern

java.lang.Object
  extended by edu.stanford.hci.r3.pattern.TiledPattern

public class TiledPattern
extends java.lang.Object

A TiledPatternGenerator can create a TiledPattern object, which allows you to iterate through the object to find the dot pattern.

This class will also know the physical and logical coordinates of the pattern that it reads in. This allows other classes to determine this information later on, for coordinate transformations, etc.

This software is distributed under the BSD License.


Constructor Summary
TiledPattern(PatternPackage thePatternPackage, int initialPatternFileN, int initialDotHorizOffset, int initialDotVertOffset, int numTilesNeededX, int numTilesNeededY, int numDotsXFromRightMostTiles, int numDotsYFromBottomMostTiles)
          The creator of this object has to calculate exactly how many dots it needs.
 
Method Summary
 int getInitialPatternFileNumber()
           
 int getLastPatternFileUsed()
           
 int getNumDotsXFromRightMostTiles()
           
 int getNumDotsXPerFullTile()
           
 int getNumDotsYFromBottomMostTiles()
           
 int getNumDotsYPerFullTile()
           
 double getNumHorizDotsBetweenTiles()
           
 int getNumTilesX()
           
 int getNumTilesY()
           
 int getNumTotalColumns()
           
 int getNumTotalRows()
           
 double getNumVertDotsBetweenTiles()
           
 double getOriginXInDots()
           
 double getOriginYInDots()
           
 java.lang.String getPatternOnRow(int row)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TiledPattern

public TiledPattern(PatternPackage thePatternPackage,
                    int initialPatternFileN,
                    int initialDotHorizOffset,
                    int initialDotVertOffset,
                    int numTilesNeededX,
                    int numTilesNeededY,
                    int numDotsXFromRightMostTiles,
                    int numDotsYFromBottomMostTiles)
The creator of this object has to calculate exactly how many dots it needs. This class doesn't have smarts. It will give you exactly what you ask for.

Parameters:
thePatternPackage -
initialPatternFileN -
initialDotHorizOffset -
initialDotVertOffset -
numTilesNeededX -
numTilesNeededY -
numDotsXFromRightMostTiles -
numDotsYFromBottomMostTiles -
Method Detail

getInitialPatternFileNumber

public int getInitialPatternFileNumber()
Returns:
which file we will use to start looking for pattern.

getLastPatternFileUsed

public int getLastPatternFileUsed()
Returns:
which was the last file we took pattern from.

getNumDotsXFromRightMostTiles

public int getNumDotsXFromRightMostTiles()

getNumDotsXPerFullTile

public int getNumDotsXPerFullTile()
Returns:

getNumDotsYFromBottomMostTiles

public int getNumDotsYFromBottomMostTiles()

getNumDotsYPerFullTile

public int getNumDotsYPerFullTile()
Returns:

getNumHorizDotsBetweenTiles

public double getNumHorizDotsBetweenTiles()
Returns:

getNumTilesX

public int getNumTilesX()
Returns:

getNumTilesY

public int getNumTilesY()
Returns:

getNumTotalColumns

public int getNumTotalColumns()
Returns:

getNumTotalRows

public int getNumTotalRows()
Returns:
the number of rows of pattern this object represents

getNumVertDotsBetweenTiles

public double getNumVertDotsBetweenTiles()
Returns:

getOriginXInDots

public double getOriginXInDots()
Returns:
X coordinate of the top of the tile.

getOriginYInDots

public double getOriginYInDots()
Returns:
Y coordinate of the top of the tile.

getPatternOnRow

public java.lang.String getPatternOnRow(int row)
Parameters:
row -
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

Copyright 2006 Stanford University