com.jme.util.stat.graph
Class AbstractStatGrapher

java.lang.Object
  extended by com.jme.util.stat.graph.AbstractStatGrapher
All Implemented Interfaces:
StatListener
Direct Known Subclasses:
LineGrapher, TabledLabelGrapher, TimedAreaGrapher

public abstract class AbstractStatGrapher
extends java.lang.Object
implements StatListener

Base class for graphers.

Author:
Joshua Slack

Field Summary
protected  java.util.TreeMap<StatType,java.util.HashMap<java.lang.String,java.lang.Object>> config
           
protected  boolean enabled
           
protected  int gHeight
           
protected  int gWidth
           
protected  Texture2D tex
           
protected  TextureRenderer texRenderer
           
 
Constructor Summary
AbstractStatGrapher(int width, int height)
          Must be constructed in the GL thread.
 
Method Summary
 void addConfig(StatType type, java.util.HashMap<java.lang.String,java.lang.Object> configs)
           
 void addConfig(StatType type, java.lang.String key, java.lang.Object value)
           
 void clearConfig()
           
 void clearConfig(StatType type)
           
 void clearConfig(StatType type, java.lang.String key)
           
protected  boolean getBooleanConfig(StatType type, java.lang.String configName, boolean defaultVal)
           
protected  ColorRGBA getColorConfig(StatType type, java.lang.String configName, ColorRGBA defaultVal)
           
protected  double getDoubleConfig(StatType type, java.lang.String configName, double defaultVal)
           
protected  float getFloatConfig(StatType type, java.lang.String configName, float defaultVal)
           
protected  int getIntConfig(StatType type, java.lang.String configName, int defaultVal)
           
protected  long getLongConfig(StatType type, java.lang.String configName, long defaultVal)
           
protected  short getShortConfig(StatType type, java.lang.String configName, short defaultVal)
           
protected  java.lang.String getStringConfig(StatType type, java.lang.String configName, java.lang.String defaultVal)
           
 TextureRenderer getTexRenderer()
           
 boolean hasConfig(StatType type)
           
 boolean isEnabled()
           
abstract  void reset()
          Called when the graph needs to be reset back to the original display state.
 void setEnabled(boolean enabled)
           
 void setTexture(Texture2D tex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme.util.stat.StatListener
statsUpdated
 

Field Detail

texRenderer

protected TextureRenderer texRenderer

tex

protected Texture2D tex

gWidth

protected int gWidth

gHeight

protected int gHeight

config

protected java.util.TreeMap<StatType,java.util.HashMap<java.lang.String,java.lang.Object>> config

enabled

protected boolean enabled
Constructor Detail

AbstractStatGrapher

public AbstractStatGrapher(int width,
                           int height)
Must be constructed in the GL thread.

Method Detail

setTexture

public void setTexture(Texture2D tex)

getTexRenderer

public TextureRenderer getTexRenderer()

clearConfig

public void clearConfig()

clearConfig

public void clearConfig(StatType type)

clearConfig

public void clearConfig(StatType type,
                        java.lang.String key)

addConfig

public void addConfig(StatType type,
                      java.util.HashMap<java.lang.String,java.lang.Object> configs)

addConfig

public void addConfig(StatType type,
                      java.lang.String key,
                      java.lang.Object value)

getColorConfig

protected ColorRGBA getColorConfig(StatType type,
                                   java.lang.String configName,
                                   ColorRGBA defaultVal)

getStringConfig

protected java.lang.String getStringConfig(StatType type,
                                           java.lang.String configName,
                                           java.lang.String defaultVal)

getShortConfig

protected short getShortConfig(StatType type,
                               java.lang.String configName,
                               short defaultVal)

getIntConfig

protected int getIntConfig(StatType type,
                           java.lang.String configName,
                           int defaultVal)

getLongConfig

protected long getLongConfig(StatType type,
                             java.lang.String configName,
                             long defaultVal)

getFloatConfig

protected float getFloatConfig(StatType type,
                               java.lang.String configName,
                               float defaultVal)

getDoubleConfig

protected double getDoubleConfig(StatType type,
                                 java.lang.String configName,
                                 double defaultVal)

getBooleanConfig

protected boolean getBooleanConfig(StatType type,
                                   java.lang.String configName,
                                   boolean defaultVal)

hasConfig

public boolean hasConfig(StatType type)

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

reset

public abstract void reset()
Called when the graph needs to be reset back to the original display state. (iow, remove all points, lines, etc.)