|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.util.TimeSeries
org.generation5.util.AutoTimeSeries
This class extends TimeSeries by automatically creating a time-series
across an interval period, or given at step numbers. For example, if you want
to create a time-series image of a CA world every 100 iterations, or perhaps at
steps 1, 10, 100, 1000 and 10,000.
Note that the steppable object and the visualizable object can be separate,
allowing for more complex time-series images.
| Field Summary | |
protected boolean |
autoGenerate
Determies whether the time-series is to be automatically generated when calls to render are called. |
protected Steppable |
steppable
The steppable object. |
protected Visualizable |
visualizable
The visualizable object. |
| Fields inherited from class org.generation5.util.TimeSeries |
ANTIALIAS, backColor, BORDERS, columns, drawFlags, imgArray, INNER_BORDER, innerBorder, NONE, OUTER_BORDER, outerBorder, rows |
| Constructor Summary | |
AutoTimeSeries()
Creates a new instance of TimeSeries |
|
| Method Summary | |
void |
generateSnapshots(int width,
int height)
This method generates the time-series snapshots. |
static void |
main(java.lang.String[] args)
|
void |
render(java.awt.Graphics g,
int width,
int height)
Render the time-series on a graphics context. |
void |
reset()
Reset the time-series options. |
void |
setAutoGenerate(boolean autoGen)
Set whether the time-series is auto-generated or not. |
void |
setSnapshotAt(int iteration)
Set a snapshot at a particular timestep. |
void |
setSnapshotInterval(int interval)
Set an interval at which to take a snapshot. |
void |
setSteppable(Steppable steppable)
Set the steppable object. |
void |
setVisualizable(Visualizable visualizable)
Set the visualizable object. |
void |
writeImage(java.lang.String s,
int width,
int height)
Write the series to an image. |
| Methods inherited from class org.generation5.util.TimeSeries |
addSnapshot, addSnapshot, getSnapshots, setBackgroundColor, setBorderColor, setBorderColors, setDimensions, setFormat |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean autoGenerate
protected Steppable steppable
protected Visualizable visualizable
| Constructor Detail |
public AutoTimeSeries()
| Method Detail |
public void setVisualizable(Visualizable visualizable)
visualizable - the visualizable object.public void setSteppable(Steppable steppable)
steppable - the steppable object.public void setSnapshotAt(int iteration)
setSnapshotAt
should be in ascending order; anything else will cause undefined behaviour.
This method cannot be used in conjunction with setSnapshotInterval.
iteration - the step number to take a snapshot at.public void setSnapshotInterval(int interval)
setSnapshotAt.
interval - the snapshot interval.public void setAutoGenerate(boolean autoGen)
autoGen - set whether the time-series is auto-generated or not.public void reset()
public void generateSnapshots(int width,
int height)
render is called. Under some
circumstances, you want to generate the snapshots separately to a call to
render or writeImage.
width - the overall width.height - the overall height.setAutoGenerate(boolean)
public void render(java.awt.Graphics g,
int width,
int height)
render in interface Visualizablerender in class TimeSeriesg - 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)
writeImage in interface VisualizablewriteImage in class TimeSeriess - the image filename.width - the width of the image.height - the height of the image.public 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 | ||||||||||