Class PingGraphic
- java.lang.Object
-
- com.biglybt.ui.swt.components.graphics.BackGroundGraphic
-
- com.biglybt.ui.swt.components.graphics.ScaledGraphic
-
- com.biglybt.ui.swt.components.graphics.PingGraphic
-
- All Implemented Interfaces:
ParameterListener
,Graphic
public class PingGraphic extends ScaledGraphic implements ParameterListener
-
-
Field Summary
Fields Modifier and Type Field Description private int[][]
all_values
protected org.eclipse.swt.graphics.Image
bufferImage
private static int
COLOR_AVERAGE
private org.eclipse.swt.graphics.Color[]
colors
private int
currentPosition
static org.eclipse.swt.graphics.Color[]
defaultColors
private static int
ENTRIES
private boolean
externalAverage
private int
graphicsUpdate
private int
internalLoop
private int
nbValues
private org.eclipse.swt.graphics.Point
oldSize
-
Fields inherited from class com.biglybt.ui.swt.components.graphics.ScaledGraphic
bufferScale, formater, scale
-
Fields inherited from class com.biglybt.ui.swt.components.graphics.BackGroundGraphic
bufferBackground, colorWhite, drawCanvas, lightGrey, lightGrey2, this_mon
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PingGraphic(Scale scale, ValueFormater formater)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIntsValue(int[] new_values)
protected void
addMenuItems(org.eclipse.swt.widgets.Menu menu)
protected int
computeAverage(int position)
void
dispose()
protected void
drawChart(boolean sizeChanged)
static PingGraphic
getInstance()
void
initialize(org.eclipse.swt.widgets.Canvas canvas)
void
parameterChanged(java.lang.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 com.biglybt.ui.swt.components.graphics.ScaledGraphic
drawScale, setUpdateDividerWidth
-
Methods inherited from class com.biglybt.ui.swt.components.graphics.BackGroundGraphic
drawBackGround, setColors, setSIIECSensitive
-
-
-
-
Field Detail
-
ENTRIES
private static final int ENTRIES
- See Also:
- Constant Field Values
-
COLOR_AVERAGE
private static final int COLOR_AVERAGE
- See Also:
- Constant Field Values
-
defaultColors
public static org.eclipse.swt.graphics.Color[] defaultColors
-
internalLoop
private int internalLoop
-
graphicsUpdate
private int graphicsUpdate
-
oldSize
private org.eclipse.swt.graphics.Point oldSize
-
bufferImage
protected org.eclipse.swt.graphics.Image bufferImage
-
nbValues
private int nbValues
-
all_values
private int[][] all_values
-
currentPosition
private int currentPosition
-
externalAverage
private boolean externalAverage
-
colors
private org.eclipse.swt.graphics.Color[] colors
-
-
Constructor Detail
-
PingGraphic
private PingGraphic(Scale scale, ValueFormater formater)
-
-
Method Detail
-
getInstance
public static PingGraphic getInstance()
-
setColors
public void setColors(org.eclipse.swt.graphics.Color[] _colors)
-
setExternalAverage
public void setExternalAverage(boolean b)
-
addMenuItems
protected void addMenuItems(org.eclipse.swt.widgets.Menu menu)
- Overrides:
addMenuItems
in classBackGroundGraphic
-
addIntsValue
public void addIntsValue(int[] new_values)
-
initialize
public void initialize(org.eclipse.swt.widgets.Canvas canvas)
- Specified by:
initialize
in interfaceGraphic
- Overrides:
initialize
in classBackGroundGraphic
-
refresh
public void refresh(boolean force)
- Specified by:
refresh
in interfaceGraphic
- Overrides:
refresh
in classBackGroundGraphic
-
refresh
public void refresh()
-
drawChart
protected void drawChart(boolean sizeChanged)
-
computeAverage
protected int computeAverage(int position)
-
parameterChanged
public void parameterChanged(java.lang.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 interfaceParameterListener
- Parameters:
parameter
- the name of the parameter that has changed
-
dispose
public void dispose()
- Overrides:
dispose
in classScaledGraphic
-
-