org.omegahat.Graphics.Plots
Class DynamicTimeSeries

java.lang.Object
  |
  +--org.omegahat.Graphics.Primitives.GraphicalObject
        |
        +--org.omegahat.Graphics.Primitives.RGO
              |
              +--org.omegahat.Graphics.Primitives.GraphicalContainer
                    |
                    +--org.omegahat.Graphics.Plots.DataPlot
                          |
                          +--org.omegahat.Graphics.Plots.DynamicTimeSeries
All Implemented Interfaces:
Addable, Copyable, GraphicalComponentInt, GraphicalContainerInt, MathOperable, ScaledComponentInt, SimpleGraphicalContainerInt, Subsettable, Tree

public class DynamicTimeSeries
extends DataPlot

A basic Dynamic Time Series plot. The x-range and y-range are pre-specified (i.e., the scales do not change), but points are added one at a time (i.e., the data are not predefined)


Fields inherited from class org.omegahat.Graphics.Plots.DataPlot
dataRegion, xAxis, xLabel, yAxis, yLabel
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalContainer
allocator, children, origin, parent, scaleX, scaleY
 
Fields inherited from class org.omegahat.Graphics.Primitives.RGO
region
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
ACTIVE, fontSize, lastDevice, lastHeightCM, lastRegion, lastWidthCM, parents, status, VISIBLE
 
Fields inherited from interface org.omegahat.Environment.DataStructures.MathOperable
DIVIDE, MINUS, MULTIPLY, PLUS
 
Constructor Summary
DynamicTimeSeries()
           
DynamicTimeSeries(Scale xScale, Scale yScale)
           
 
Method Summary
 void addValue(double y, boolean update)
          Add a symbol dynamically.
 void adjustXScale(boolean update)
           
 void adjustYScale(double y, boolean update)
           
 GraphicalComponentInt createSymbol(double x, double y)
          The method used to generate the plotting symbol for the new value
 double defaultYStep(double minStep, double currentRange)
           
 int getNumValues()
           
 boolean getUpdateXScale()
           
 boolean getUpdateYScale()
           
 double getXMaxStep()
           
 double getXMinStep()
           
 double getYMaxStep()
           
 double getYMinStep()
           
 boolean setUpdateXScale(boolean update)
           
 boolean setUpdateYScale(boolean update)
           
 double setXMaxStep(double step)
           
 double setXMinStep(double step)
           
 double setYMaxStep(double step)
           
 double setYMinStep(double step)
           
 
Methods inherited from class org.omegahat.Graphics.Plots.DataPlot
bottomAxis, bottomAxis, createDataRegion, createDataRegion, createDataRegion, createRegionAllocator, dataRegion, getXAxis, getXLabel, getYAxis, getYLabel, leftAxis, leftAxis, make, setXAxis, setXLabel, setYAxis, setYLabel
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalContainer
add, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addValue, copy, copy, draw, drawChildren, get, getChild, getChildCount, getChildren, getDevice, getOrigin, getRegionAllocator, getXScale, getYScale, parent, parent, remove, removeGraphicalObject, removeGraphicalObject, setOrigin, setRegionAllocator, setXScale, setYScale, subset, subset, transform, transform
 
Methods inherited from class org.omegahat.Graphics.Primitives.RGO
center, centre, createRegionDescription, createRegionDescription, getRegion, height, height, setHJust, setRegion, setVJust, width, width, x, x, y, y
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
cacheSize, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parents, setActive, setParameters, setParents, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omegahat.Graphics.Primitives.GraphicalComponentInt
getParameters, getRegion, isActive, isVisible, parents, setActive, setParameters, setRegion, setVisible
 

Constructor Detail

DynamicTimeSeries

public DynamicTimeSeries()

DynamicTimeSeries

public DynamicTimeSeries(Scale xScale,
                         Scale yScale)
Method Detail

getNumValues

public int getNumValues()

setXMaxStep

public double setXMaxStep(double step)

getXMaxStep

public double getXMaxStep()

setXMinStep

public double setXMinStep(double step)

getXMinStep

public double getXMinStep()

setUpdateXScale

public boolean setUpdateXScale(boolean update)

getUpdateXScale

public boolean getUpdateXScale()

setYMaxStep

public double setYMaxStep(double step)

getYMaxStep

public double getYMaxStep()

setYMinStep

public double setYMinStep(double step)

getYMinStep

public double getYMinStep()

setUpdateYScale

public boolean setUpdateYScale(boolean update)

getUpdateYScale

public boolean getUpdateYScale()

addValue

public void addValue(double y,
                     boolean update)
Add a symbol dynamically. Only a y-value is required. Only the new symbol is redrawn. It may be necessary to adjust the scales; only check if getUpdate[X|Y]Scale() is true only redraw if "update" is true

createSymbol

public GraphicalComponentInt createSymbol(double x,
                                          double y)
The method used to generate the plotting symbol for the new value

adjustXScale

public void adjustXScale(boolean update)

defaultYStep

public double defaultYStep(double minStep,
                           double currentRange)

adjustYScale

public void adjustYScale(double y,
                         boolean update)