Class SpeedGraphic
java.lang.Object
com.biglybt.ui.swt.components.graphics.BackGroundGraphic
com.biglybt.ui.swt.components.graphics.ScaledGraphic
com.biglybt.ui.swt.components.graphics.SpeedGraphic
- All Implemented Interfaces:
ParameterListener, Graphic
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private long[][]protected org.eclipse.swt.graphics.Imagestatic final intstatic final intstatic final intstatic final intstatic final intstatic final intorg.eclipse.swt.graphics.Color[]private intprivate static final intprivate intprivate intprivate intprivate intprivate org.eclipse.swt.graphics.Pointprivate longprivate SimpleDateFormatFields inherited from class ScaledGraphic
bufferScale, formater, scaleFields inherited from class BackGroundGraphic
bufferBackground, colorBlack, colorGrey, colorWhite, drawCanvas, this_mon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntsValue(int[] new_values) voidaddIntValue(int value) voidaddLongsValue(long[] new_values) voidaddLongValue(long value) protected voidaddMenuItems(org.eclipse.swt.widgets.Menu menu) protected intcomputeAverage(int position) voiddispose()protected voiddrawChart(boolean sizeChanged) static SpeedGraphicstatic SpeedGraphicgetInstance(Scale scale, ValueFormater formatter) static SpeedGraphicgetInstance(ValueFormater formatter) voidinitialize(org.eclipse.swt.widgets.Canvas canvas) voidparameterChanged(String parameter) Called, when a parameter has changed.voidrefresh(boolean force) voidsetLineColors(org.eclipse.swt.graphics.Color[] newChangeableColorSet) voidsetLineColors(org.eclipse.swt.graphics.Color average, org.eclipse.swt.graphics.Color speed, org.eclipse.swt.graphics.Color overhead, org.eclipse.swt.graphics.Color limit, org.eclipse.swt.graphics.Color others, org.eclipse.swt.graphics.Color trimmed) Methods inherited from class ScaledGraphic
drawScale, setUpdateDividerWidthMethods inherited from class BackGroundGraphic
drawBackGround, setSIIECSensitive
-
Field Details
-
DEFAULT_ENTRIES
private static final int DEFAULT_ENTRIES- See Also:
-
COLOR_AVERAGE
public static final int COLOR_AVERAGE- See Also:
-
COLOR_MAINSPEED
public static final int COLOR_MAINSPEED- See Also:
-
COLOR_OVERHEAD
public static final int COLOR_OVERHEAD- See Also:
-
COLOR_LIMIT
public static final int COLOR_LIMIT- See Also:
-
COLOR_OTHERS
public static final int COLOR_OTHERS- See Also:
-
COLOR_TRIMMED
public static final int COLOR_TRIMMED- See Also:
-
colors
public org.eclipse.swt.graphics.Color[] colors -
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 -
maxEntries
private int maxEntries -
all_values
private long[][] all_values -
startTime
private long startTime -
ages
private int[] ages -
currentPosition
private int currentPosition -
timeFormatter
-
timePositions
-
-
Constructor Details
-
SpeedGraphic
-
-
Method Details
-
initialize
public void initialize(org.eclipse.swt.widgets.Canvas canvas) - Specified by:
initializein interfaceGraphic- Overrides:
initializein classBackGroundGraphic
-
getInstance
-
getInstance
-
getInstance
-
addMenuItems
protected void addMenuItems(org.eclipse.swt.widgets.Menu menu) - Overrides:
addMenuItemsin classBackGroundGraphic
-
addIntsValue
public void addIntsValue(int[] new_values) -
addLongsValue
public void addLongsValue(long[] new_values) -
addIntValue
public void addIntValue(int value) -
addLongValue
public void addLongValue(long value) -
refresh
public void refresh(boolean force) - Specified by:
refreshin interfaceGraphic- Overrides:
refreshin classBackGroundGraphic
-
drawChart
protected void drawChart(boolean sizeChanged) -
computeAverage
protected int computeAverage(int position) -
parameterChanged
Description copied from interface:ParameterListenerCalled, 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:
parameterChangedin interfaceParameterListener- Parameters:
parameter- the name of the parameter that has changed
-
dispose
public void dispose()- Overrides:
disposein classScaledGraphic
-
setLineColors
public void setLineColors(org.eclipse.swt.graphics.Color average, org.eclipse.swt.graphics.Color speed, org.eclipse.swt.graphics.Color overhead, org.eclipse.swt.graphics.Color limit, org.eclipse.swt.graphics.Color others, org.eclipse.swt.graphics.Color trimmed) -
setLineColors
public void setLineColors(org.eclipse.swt.graphics.Color[] newChangeableColorSet)
-