|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.util.TimeSeries
This class creates a time-series of images. Snapshots of a Visualizable
object are added on-the-fly, before specifying the row/column layout and rendering
or writing the time-series image.
For automatic time-series diagrams, see AutoTimeSeries.
AutoTimeSeries| Field Summary | |
static int |
ANTIALIAS
Anti-alias all captured images (default). |
protected java.awt.Color |
backColor
The background colour. |
static int |
BORDERS
Draw both inner and outer borders (default). |
protected int |
columns
The number of columns in the time-series diagram. |
protected int |
drawFlags
The drawing options for the diagram. |
protected java.util.LinkedList |
imgArray
The image linked list. |
static int |
INNER_BORDER
Draw inner borders. |
protected java.awt.Color |
innerBorder
The inner border colour. |
static int |
NONE
No drawing options specified. |
static int |
OUTER_BORDER
Draw outer borders. |
protected java.awt.Color |
outerBorder
The outer border colour. |
protected int |
rows
The number of rows in the time-series diagram. |
| Constructor Summary | |
TimeSeries()
Creates a new instance of TimeSeries |
|
| Method Summary | |
void |
addSnapshot(java.awt.image.BufferedImage snapshot)
Directly add an image to the time-series. |
void |
addSnapshot(Visualizable visObject,
int width,
int height)
Add a snapshot to the time-series image. |
int |
getSnapshots()
Return the number of snapshots currently stored. |
static void |
main(java.lang.String[] args)
|
void |
render(java.awt.Graphics g,
int width,
int height)
Renders the time-series diagram. |
void |
setBackgroundColor(java.awt.Color back)
Set the background colour. |
void |
setBorderColor(java.awt.Color borderColor)
Set the border colour. |
void |
setBorderColors(java.awt.Color innerBorder,
java.awt.Color outerBorder)
Set the inner and outer border colours separately. |
void |
setDimensions(int rows,
int columns)
Set the row/column layout of the image. |
void |
setFormat(int flags)
Set the drawing options. |
void |
writeImage(java.lang.String s,
int width,
int height)
Write an image using the class data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int rows
protected int columns
protected int drawFlags
protected java.awt.Color backColor
protected java.awt.Color innerBorder
protected java.awt.Color outerBorder
protected java.util.LinkedList imgArray
public static final int NONE
public static final int OUTER_BORDER
public static final int INNER_BORDER
public static final int BORDERS
public static final int ANTIALIAS
| Constructor Detail |
public TimeSeries()
| Method Detail |
public void setDimensions(int rows,
int columns)
rows - number of rows.columns - number of columns.public void setBackgroundColor(java.awt.Color back)
back - the background colour.public void setFormat(int flags)
flags - the drawing options.public void setBorderColor(java.awt.Color borderColor)
setBorderColors(borderColor, borderColor);
borderColor - the inner/outer border colour.
public void setBorderColors(java.awt.Color innerBorder,
java.awt.Color outerBorder)
innerBorder - the inner border colour.outerBorder - the outer border colour.
public void addSnapshot(Visualizable visObject,
int width,
int height)
render for more details.
visObject - the object to capture.width - the width of the snapshot.height - the height of the snapshot.render(java.awt.Graphics, int, int)public void addSnapshot(java.awt.image.BufferedImage snapshot)
snapshot - the buffered image snapshot.public int getSnapshots()
public void render(java.awt.Graphics g,
int width,
int height)
4x4, with 9 images
x x x x
x x x x
x _ _ _
_ _ _ _
3x3, with 9 images
x x x
x x x
x x x
It is also important to note that the captured images are cropped (if necessary)
to the appropriate cell size for the time-series image. For example, if snapshots
are taken at 200x200, but render is called to draw the time-series
image at 600x600 with a layout of 6x6, the captured images will be cropped (not
resized).
render in interface Visualizableg - the graphics context.width - the width of the context.height - the height of the context.
public void writeImage(java.lang.String s,
int width,
int height)
Visualizable
writeImage in interface Visualizables - the filename of the image to writewidth - the width of the imageheight - the height of the imagepublic static void main(java.lang.String[] args)
args - the command line arguments
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||