Class MultiPlotGraphic
java.lang.Object
com.biglybt.ui.swt.components.graphics.BackGroundGraphic
com.biglybt.ui.swt.components.graphics.ScaledGraphic
com.biglybt.ui.swt.components.graphics.MultiPlotGraphic
- All Implemented Interfaces:
ParameterListener, Graphic
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[][]private org.eclipse.swt.graphics.Imageprivate intprivate static final intprivate long[]private intprivate intprivate booleanprivate intprivate intprivate org.eclipse.swt.graphics.Pointprivate SimpleDateFormatprivate TimerEventPeriodicprivate booleanprivate intprivate ValueSource[]Fields inherited from class ScaledGraphic
bufferScale, formater, scaleFields inherited from class BackGroundGraphic
bufferBackground, colorBlack, colorGrey, colorWhite, drawCanvas, this_mon -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMultiPlotGraphic(Scale scale, ValueSource[] sources, ValueFormater formater, int num_entries) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddIntsValue(int[] new_values) protected voidaddMenuItems(org.eclipse.swt.widgets.Menu menu) voiddispose()voiddispose(boolean _maintain_history) protected voiddrawChart(boolean sizeChanged) int[]getAverage(int num_entries) int[][]static MultiPlotGraphicgetInstance(int num_entries, ValueSource[] sources, ValueFormater formatter) static MultiPlotGraphicgetInstance(ValueSource[] sources, ValueFormater formatter) intprivate voidinit(int[][] history, long[] times) voidinitialize(org.eclipse.swt.widgets.Canvas canvas) voidinitialize(org.eclipse.swt.widgets.Canvas canvas, boolean is_active) voidparameterChanged(String parameter) Called, when a parameter has changed.voidrefresh(boolean force) voidreset(int[][] history) voidreset(int[][] history, long[] times) voidsetActive(boolean active) voidsetActive(boolean active, int period_millis) 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:
-
value_sources
-
internalLoop
private int internalLoop -
graphicsUpdate
private int graphicsUpdate -
oldSize
private org.eclipse.swt.graphics.Point oldSize -
bufferImage
private org.eclipse.swt.graphics.Image bufferImage -
nbValues
private int nbValues -
maxEntries
private int maxEntries -
all_values
private int[][] all_values -
currentPosition
private int currentPosition -
update_outstanding
private boolean update_outstanding -
update_period_millis
private int update_period_millis -
update_event
-
maintain_history
private boolean maintain_history -
timeFormatter
-
explicitTimes
private long[] explicitTimes
-
-
Constructor Details
-
MultiPlotGraphic
private MultiPlotGraphic(Scale scale, ValueSource[] sources, ValueFormater formater, int num_entries)
-
-
Method Details
-
getInstance
-
getInstance
public static MultiPlotGraphic getInstance(int num_entries, ValueSource[] sources, ValueFormater formatter) -
init
private void init(int[][] history, long[] times) -
getHistory
public int[][] getHistory() -
initialize
public void initialize(org.eclipse.swt.widgets.Canvas canvas) - Specified by:
initializein interfaceGraphic- Overrides:
initializein classBackGroundGraphic
-
initialize
public void initialize(org.eclipse.swt.widgets.Canvas canvas, boolean is_active) -
addMenuItems
protected void addMenuItems(org.eclipse.swt.widgets.Menu menu) - Overrides:
addMenuItemsin classBackGroundGraphic
-
setActive
public void setActive(boolean active) -
setActive
public void setActive(boolean active, int period_millis) -
reset
public void reset(int[][] history) -
reset
public void reset(int[][] history, long[] times) -
getAverage
public int[] getAverage(int num_entries) -
addIntsValue
private void addIntsValue(int[] new_values) -
refresh
public void refresh(boolean force) - Specified by:
refreshin interfaceGraphic- Overrides:
refreshin classBackGroundGraphic
-
getVisibleEntryCount
public int getVisibleEntryCount() -
drawChart
protected void drawChart(boolean sizeChanged) -
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
-
dispose
public void dispose(boolean _maintain_history)
-