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.Image
private int
private static final int
private long[]
private int
private int
private boolean
private int
private int
private org.eclipse.swt.graphics.Point
private SimpleDateFormat
private TimerEventPeriodic
private boolean
private int
private ValueSource[]
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, colorBlack, colorGrey, colorWhite, drawCanvas, this_mon
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MultiPlotGraphic
(Scale scale, ValueSource[] sources, ValueFormater formater, int num_entries) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addIntsValue
(int[] new_values) protected void
addMenuItems
(org.eclipse.swt.widgets.Menu menu) void
dispose()
void
dispose
(boolean _maintain_history) protected void
drawChart
(boolean sizeChanged) int[]
getAverage
(int num_entries) int[][]
static MultiPlotGraphic
getInstance
(int num_entries, ValueSource[] sources, ValueFormater formatter) static MultiPlotGraphic
getInstance
(ValueSource[] sources, ValueFormater formatter) int
private void
init
(int[][] history, long[] times) void
initialize
(org.eclipse.swt.widgets.Canvas canvas) void
initialize
(org.eclipse.swt.widgets.Canvas canvas, boolean is_active) void
parameterChanged
(String parameter) Called, when a parameter has changed.void
refresh
(boolean force) void
reset
(int[][] history) void
reset
(int[][] history, long[] times) void
setActive
(boolean active) void
setActive
(boolean active, int period_millis) 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, 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:
initialize
in interfaceGraphic
- Overrides:
initialize
in 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:
addMenuItems
in 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:
refresh
in interfaceGraphic
- Overrides:
refresh
in classBackGroundGraphic
-
getVisibleEntryCount
public int getVisibleEntryCount() -
drawChart
protected void drawChart(boolean sizeChanged) -
parameterChanged
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
-
dispose
public void dispose(boolean _maintain_history)
-