edu.cmu.emulator.graph
Class Series

java.lang.Object
  extended by edu.cmu.emulator.graph.Series

public class Series
extends Object


Field Summary
protected  Color color
           
protected  int EMPTY_INDEX
           
protected  GTransform gt
           
protected  int iEnd
           
protected  int iStart
           
protected  Stroke stroke
           
protected  double[] xVals
           
protected  double[] yVals
           
 
Constructor Summary
Series(int size, boolean useLines, Color color)
           
 
Method Summary
 void addValue(double x, double y)
           
 void draw(Graphics2D g2, GTransform gt)
           
 void dropOldestValue()
           
 boolean empty()
           
 boolean full()
           
 double[] getXVals()
           
 double[] getYVals()
           
protected  int nextIndex(int index)
           
protected  int prevIndex(int index)
           
 void setStroke(Stroke stroke)
           
 void setVals(double[] xVals, double[] yVals)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xVals

protected double[] xVals

yVals

protected double[] yVals

color

protected Color color

stroke

protected Stroke stroke

gt

protected GTransform gt

iStart

protected int iStart

iEnd

protected int iEnd

EMPTY_INDEX

protected int EMPTY_INDEX
Constructor Detail

Series

public Series(int size,
              boolean useLines,
              Color color)
Method Detail

setStroke

public void setStroke(Stroke stroke)

setVals

public void setVals(double[] xVals,
                    double[] yVals)

getXVals

public double[] getXVals()

getYVals

public double[] getYVals()

draw

public void draw(Graphics2D g2,
                 GTransform gt)

nextIndex

protected final int nextIndex(int index)

prevIndex

protected final int prevIndex(int index)

addValue

public void addValue(double x,
                     double y)

full

public boolean full()

empty

public boolean empty()

dropOldestValue

public void dropOldestValue()


Copyright © 2013. All Rights Reserved.