org.simBio.sim.analyzer.graph
Class GraphReplotBuffer

java.lang.Object
  extended by org.simBio.sim.analyzer.graph.GraphReplotBuffer

public class GraphReplotBuffer
extends java.lang.Object

High speed graph redrawing buffer In order to redraw a time series graph at high speed, without plotting multiple calculation results in 1 pixel of the X axis (= time axis) direction, by storing the maximum/minimum values in advance, with 1 pixel unit of the X axis (= time axis) direction, high speed line drawing can be carried out at drawing time.

Author:
misaki

Constructor Summary
GraphReplotBuffer(Graph grp, IPlot plot, TimeSeriesValues val, int series)
           
 
Method Summary
 double getDataMax(int x)
          Returns the maximum value in the calculation results of the specified index, from the redrawing buffer.
 double getDataMin(int x)
          Returns the minimum value in the calculation results of the specified index, from the redrawing buffer.
 int getRangeMax()
          Returns the maximum index of the redrawing buffer.
 int getRangeMin()
          Returns the minimum index of the redrawing buffer.
 int getSize()
          Returns the width (number of pixels displayed in the time axis) of the redrawing buffer
 void rebuild()
          Rebuilds the redrawing buffer. From a TimeSeriesValues object, get the calculation results of the time to be displayed in Graph.AxisX, and rebuild the internal redrawing buffer.
 void setData(double time, int series, double value)
          Registers calculation results in the redrawing buffer. Called in the analyze() method of Graph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphReplotBuffer

public GraphReplotBuffer(Graph grp,
                         IPlot plot,
                         TimeSeriesValues val,
                         int series)
Parameters:
grp - Graph-related object
plot - Plot-related object
val - TimeSeriesValues-related object
series - graph series number
Method Detail

rebuild

public void rebuild()
Rebuilds the redrawing buffer. From a TimeSeriesValues object, get the calculation results of the time to be displayed in Graph.AxisX, and rebuild the internal redrawing buffer.


setData

public void setData(double time,
                    int series,
                    double value)
Registers calculation results in the redrawing buffer. Called in the analyze() method of Graph

Parameters:
time - time
series - series number (ignored)
value - calculation value

getRangeMin

public int getRangeMin()
Returns the minimum index of the redrawing buffer.

Returns:
minimum index of the redrawing buffer

getRangeMax

public int getRangeMax()
Returns the maximum index of the redrawing buffer.

Returns:
maximum index of the redrawing buffer

getDataMax

public double getDataMax(int x)
Returns the maximum value in the calculation results of the specified index, from the redrawing buffer.

Parameters:
x - index
Returns:
maximum value of the calculation results

getDataMin

public double getDataMin(int x)
Returns the minimum value in the calculation results of the specified index, from the redrawing buffer.

Parameters:
x - index
Returns:
minimum value of the calculation results

getSize

public int getSize()
Returns the width (number of pixels displayed in the time axis) of the redrawing buffer

Returns:
width of the redrawing buffer


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.