All Packages Class Hierarchy This Package Previous Next Index
Class picture.Gallery
java.lang.Object
|
+----picture.PicPipe
|
+----picture.Gallery
- public class Gallery
- extends PicPipe
A gallery combines multiple PicPipe pictures into one tiling.
This code is (c) 1996 Leemon Baird
<leemon@cs.cmu.edu>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
- Version:
- 1.0, 28 March 96
- Author:
- Leemon Baird
-
border
-
-
currPict
-
-
expand
-
-
maxX
-
-
maxY
-
-
minX
-
-
minY
-
-
numRows
-
-
pic
-
-
pipes
-
-
Gallery()
-
-
BNF(int)
- Return a BNF describing how this object parses its parameters.
-
get(PicPipeList, Colors, double, double, double, double, double, double, double, double)
- Return the color of a point (x,y) in the gallery where pixels are size (dx,dy).
-
getDescription(PicPipeList)
- Return the description string that tells what this picture is.
-
getGallery()
- If this shows multiple pictures, return this as the first visible gallery.
-
maxX(double, double)
- return max x coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
-
maxY(double, double)
- return max y coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
-
minX(double, double)
- Return min x coordinate of the picture containing point (x,y).
-
minY(double, double)
- return min y coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
-
mod(double, double)
- Calculates a modulo b for doubles.
-
parse(Parser, int)
- parse a series of pictures and combine into a tiled gallery.
-
picNum(double, double)
- return the number of the picture in the gallery containing point (x,y)
-
regionMaxX(PicPipeList)
- Return max x coordinate of region this pipeline looks at
-
regionMaxY(PicPipeList)
- Return max y coordinate of region this pipeline looks at
-
regionMinX(PicPipeList)
- Return min x coordinate of region this pipeline looks at
-
regionMinY(PicPipeList)
- Return min y coordinate of region this pipeline looks at
-
resetGalleries()
- Reset all Galleries to show all their pictures, not just one.
-
select(double, double)
- In the future, show just one picture, not a collection.
-
unparse(Unparser, int)
- Output a description of this object that can be parsed with parse().
-
whichPic(double, double)
- return the picture in the gallery containing point (x,y)
numRows
protected int numRows
border
protected double border
expand
protected double expand
pic
protected PicPipeList pic[]
pipes
protected PicPipePipeline pipes[]
minX
protected double minX[]
maxX
protected double maxX[]
minY
protected double minY[]
maxY
protected double maxY[]
currPict
protected int currPict
Gallery
public Gallery()
mod
public static final double mod(double a,
double b)
- Calculates a modulo b for doubles. Same as % if a and b are positive
whichPic
public PicPipeList whichPic(double x,
double y)
- return the picture in the gallery containing point (x,y)
picNum
public int picNum(double x,
double y)
- return the number of the picture in the gallery containing point (x,y)
minX
public double minX(double x,
double y)
- Return min x coordinate of the picture containing point (x,y).
This tells where on the screen the corners of this little picture lie.
This can be used to highlight the little picture when clicked on.
maxX
public double maxX(double x,
double y)
- return max x coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
This can be used to highlight the little picture when clicked on.
minY
public double minY(double x,
double y)
- return min y coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
This can be used to highlight the little picture when clicked on.
maxY
public double maxY(double x,
double y)
- return max y coordinate of the picture containing point (x,y)
This tells where on the screen the corners of this little picture lie.
This can be used to highlight the little picture when clicked on.
get
public void get(PicPipeList source,
Colors color,
double x,
double y,
double z,
double t,
double dx,
double dy,
double dz,
double dt)
- Return the color of a point (x,y) in the gallery where pixels are size (dx,dy).
The gallery has (x,y) going from (-1,-1) to (1,1).
The subpicture at slot (gx,gy) has a local frame of reference going
from (-1,-1) to (1,1) within that picture, and (x,y) in that coordinate
system is (px,py). The subpictures can be changed to
show a region other than (-1,-1)-(1,1).
The 4 functions such as regionMinX() define the region to show.
- Overrides:
- get in class PicPipe
BNF
public String BNF(int lang)
- Return a BNF describing how this object parses its parameters.
- Overrides:
- BNF in class PicPipe
unparse
public void unparse(Unparser u,
int lang)
- Output a description of this object that can be parsed with parse().
- Overrides:
- unparse in class PicPipe
- See Also:
- Parsable
parse
public Object parse(Parser p,
int lang) throws ParserException
- parse a series of pictures and combine into a tiled gallery.
- Throws: ParserException
- parser didn't find the required token
- Overrides:
- parse in class PicPipe
getGallery
public Gallery getGallery()
- If this shows multiple pictures, return this as the first visible gallery.
If this shows only one picture, then start following the list for that
picture to see if it is a gallery (possible preceded by various filters).
This is used by the ViewApplet to know which object to ask various
gallery-specific questions such as "which picture did the mouse click on?".
resetGalleries
public void resetGalleries()
- Reset all Galleries to show all their pictures, not just one.
select
public void select(double x,
double y)
- In the future, show just one picture, not a collection.
The one picture should be the one selected by the mouse click
at location (x,y).
regionMinX
public double regionMinX(PicPipeList source)
- Return min x coordinate of region this pipeline looks at
- Overrides:
- regionMinX in class PicPipe
regionMaxX
public double regionMaxX(PicPipeList source)
- Return max x coordinate of region this pipeline looks at
- Overrides:
- regionMaxX in class PicPipe
regionMinY
public double regionMinY(PicPipeList source)
- Return min y coordinate of region this pipeline looks at
- Overrides:
- regionMinY in class PicPipe
regionMaxY
public double regionMaxY(PicPipeList source)
- Return max y coordinate of region this pipeline looks at
- Overrides:
- regionMaxY in class PicPipe
getDescription
public String getDescription(PicPipeList source)
- Return the description string that tells what this picture is.
If multiple pictures are showing, return this gallery's description,
else return the description for the single picture that's showing.
- Overrides:
- getDescription in class PicPipe
All Packages Class Hierarchy This Package Previous Next Index