com.jme.util.stat.graph
Class LineGrapher

java.lang.Object
  extended by com.jme.util.stat.graph.AbstractStatGrapher
      extended by com.jme.util.stat.graph.LineGrapher
All Implemented Interfaces:
TableLinkable, StatListener

public class LineGrapher
extends AbstractStatGrapher
implements TableLinkable

Author:
Joshua Slack

Nested Class Summary
static class LineGrapher.ConfigKeys
           
(package private)  class LineGrapher.LineEntry
           
 
Field Summary
protected  int eventCount
           
protected  Node graphRoot
           
static StatType Horizontal
           
protected  Line horizontals
           
protected  float startMarker
           
protected  int threshold
           
static StatType Vertical
           
protected  Line verticals
           
 
Fields inherited from class com.jme.util.stat.graph.AbstractStatGrapher
config, enabled, gHeight, gWidth, tex, texRenderer
 
Constructor Summary
LineGrapher(int width, int height)
           
 
Method Summary
 int getThreshold()
           
 void reset()
          Called when the graph needs to be reset back to the original display state.
 void setThreshold(int threshold)
           
 void statsUpdated()
           
 Line updateLineKey(StatType type, Line lineKey)
          Update/Create a line to reflect the color, stipple, antialias and width used in the other graph.
 
Methods inherited from class com.jme.util.stat.graph.AbstractStatGrapher
addConfig, addConfig, clearConfig, clearConfig, clearConfig, getBooleanConfig, getColorConfig, getDoubleConfig, getFloatConfig, getIntConfig, getLongConfig, getShortConfig, getStringConfig, getTexRenderer, hasConfig, isEnabled, setEnabled, setTexture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Vertical

public static final StatType Vertical

Horizontal

public static final StatType Horizontal

graphRoot

protected Node graphRoot

horizontals

protected Line horizontals

verticals

protected Line verticals

eventCount

protected int eventCount

threshold

protected int threshold

startMarker

protected float startMarker
Constructor Detail

LineGrapher

public LineGrapher(int width,
                   int height)
Method Detail

statsUpdated

public void statsUpdated()
Specified by:
statsUpdated in interface StatListener

getThreshold

public int getThreshold()

setThreshold

public void setThreshold(int threshold)

updateLineKey

public Line updateLineKey(StatType type,
                          Line lineKey)
Description copied from interface: TableLinkable
Update/Create a line to reflect the color, stipple, antialias and width used in the other graph.

Specified by:
updateLineKey in interface TableLinkable
Parameters:
type - the StatType the Line is associated with.
lineKey - the Line we want to update values on (if null, a new Line should be created.)
Returns:
the updated (or created) Line

reset

public void reset()
Description copied from class: AbstractStatGrapher
Called when the graph needs to be reset back to the original display state. (iow, remove all points, lines, etc.)

Specified by:
reset in class AbstractStatGrapher