org.gudy.azureus2.ui.swt.components.graphics
Class PingGraphic

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.components.graphics.BackGroundGraphic
      extended by org.gudy.azureus2.ui.swt.components.graphics.ScaledGraphic
          extended by org.gudy.azureus2.ui.swt.components.graphics.PingGraphic
All Implemented Interfaces:
ParameterListener, Graphic

public class PingGraphic
extends ScaledGraphic
implements ParameterListener

Author:
Olivier

Field Summary
protected  org.eclipse.swt.graphics.Image bufferImage
           
static org.eclipse.swt.graphics.Color[] defaultColors
           
 
Fields inherited from class org.gudy.azureus2.ui.swt.components.graphics.ScaledGraphic
bufferScale, formater, scale
 
Fields inherited from class org.gudy.azureus2.ui.swt.components.graphics.BackGroundGraphic
bufferBackground, colorWhite, drawCanvas, lightGrey, lightGrey2, this_mon
 
Method Summary
 void addIntsValue(int[] new_values)
           
protected  int computeAverage(int position)
           
 void dispose()
           
protected  void drawChart(boolean sizeChanged)
           
static PingGraphic getInstance()
           
 void parameterChanged(String parameter)
          Called, when a parameter has changed.
 void refresh()
           
 void refresh(boolean force)
           
 void setColors(org.eclipse.swt.graphics.Color[] _colors)
           
 void setExternalAverage(boolean b)
           
 
Methods inherited from class org.gudy.azureus2.ui.swt.components.graphics.ScaledGraphic
drawScale, setUpdateDividerWidth
 
Methods inherited from class org.gudy.azureus2.ui.swt.components.graphics.BackGroundGraphic
drawBackGround, initialize, setColors, setSIIECSensitive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultColors

public static org.eclipse.swt.graphics.Color[] defaultColors

bufferImage

protected org.eclipse.swt.graphics.Image bufferImage
Method Detail

getInstance

public static PingGraphic getInstance()

setColors

public void setColors(org.eclipse.swt.graphics.Color[] _colors)

setExternalAverage

public void setExternalAverage(boolean b)

addIntsValue

public void addIntsValue(int[] new_values)

refresh

public void refresh(boolean force)
Specified by:
refresh in interface Graphic
Overrides:
refresh in class BackGroundGraphic

refresh

public void refresh()

drawChart

protected void drawChart(boolean sizeChanged)

computeAverage

protected int computeAverage(int position)

parameterChanged

public void parameterChanged(String parameter)
Description copied from interface: ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.

Specified by:
parameterChanged in interface ParameterListener
Parameters:
parameter - the name of the parameter that has changed

dispose

public void dispose()
Overrides:
dispose in class ScaledGraphic