Clear the tracker data point also when clearing graphs
This commit is contained in:
@ -5,6 +5,8 @@
|
|||||||
* Layout fixes and adjustments
|
* Layout fixes and adjustments
|
||||||
* Fixes for long translated strings
|
* Fixes for long translated strings
|
||||||
* Fixes for i2pd
|
* Fixes for i2pd
|
||||||
|
* Fix IPv6 address host
|
||||||
|
* Fix tray icon on Gnome
|
||||||
* Graph adjustments
|
* Graph adjustments
|
||||||
* Localize time format on graphs
|
* Localize time format on graphs
|
||||||
* Move Settings from a popup frame to a new tab
|
* Move Settings from a popup frame to a new tab
|
||||||
@ -15,9 +17,12 @@
|
|||||||
* Clear graph after changing router host/port
|
* Clear graph after changing router host/port
|
||||||
* Don't clear graph when user closes the window
|
* Don't clear graph when user closes the window
|
||||||
* Update to jchart2d 3.2.2 2011-09-25
|
* Update to jchart2d 3.2.2 2011-09-25
|
||||||
|
* Disable reseed monitor
|
||||||
* Remove debug output
|
* Remove debug output
|
||||||
|
* Refactoring
|
||||||
* README updates
|
* README updates
|
||||||
* Pulled in new and updated translations
|
* Pulled in new and updated translations
|
||||||
|
* Preliminary changes for plugin version
|
||||||
|
|
||||||
|
|
||||||
0.0.3 - 2015-03-02
|
0.0.3 - 2015-03-02
|
||||||
|
@ -4,8 +4,6 @@ import java.awt.Color;
|
|||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
|
|
||||||
import info.monitorenter.gui.chart.Chart2D;
|
|
||||||
import info.monitorenter.gui.chart.ITrace2D;
|
|
||||||
import info.monitorenter.gui.chart.views.ChartPanel;
|
import info.monitorenter.gui.chart.views.ChartPanel;
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
@ -166,12 +164,8 @@ public class OverviewTab extends TabLogoPanel {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public void clearGraphs() {
|
public void clearGraphs() {
|
||||||
for (ITrace2D trace : bwChart.getTraces()) {
|
bwChart.clearData();
|
||||||
trace.removeAllPoints();
|
partTunnelChart.clearData();
|
||||||
}
|
|
||||||
for (ITrace2D trace : partTunnelChart.getTraces()) {
|
|
||||||
trace.removeAllPoints();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateInfo(){
|
private void populateInfo(){
|
||||||
|
@ -90,6 +90,17 @@ public class BandwidthChart extends Chart2D{
|
|||||||
bwOutAdapter = new ObjRecorder2Trace2DAdapter(dataBWOut, bwOutTracker, "m_value", updateInterval/2);
|
bwOutAdapter = new ObjRecorder2Trace2DAdapter(dataBWOut, bwOutTracker, "m_value", updateInterval/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() {
|
||||||
|
bwInTracker.clearData();
|
||||||
|
bwOutTracker.clearData();
|
||||||
|
for (ITrace2D trace : getTraces()) {
|
||||||
|
trace.removeAllPoints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
bwInTracker.kill();
|
bwInTracker.kill();
|
||||||
|
@ -76,6 +76,16 @@ public class ParticipatingTunnelsChart extends Chart2D {
|
|||||||
partTunnelAdapter = new ObjRecorder2Trace2DAdapter(dataPartTunnels, partTunnelTracker, "m_value", updateInterval/2);
|
partTunnelAdapter = new ObjRecorder2Trace2DAdapter(dataPartTunnels, partTunnelTracker, "m_value", updateInterval/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() {
|
||||||
|
partTunnelTracker.clearData();
|
||||||
|
for (ITrace2D trace : getTraces()) {
|
||||||
|
trace.removeAllPoints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
partTunnelTracker.kill();
|
partTunnelTracker.kill();
|
||||||
|
@ -66,4 +66,9 @@ public class DummyDataCollector extends Thread implements Tracker {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public double getData() { return m_number; }
|
public double getData() { return m_number; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() { m_number = 0; }
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,9 @@ public class InboundBandwidthTracker extends Thread implements Tracker {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public double getData() { return m_value; }
|
public double getData() { return m_value; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() { m_value = 0; }
|
||||||
}
|
}
|
||||||
|
@ -70,4 +70,9 @@ public class OutboundBandwidthTracker extends Thread implements Tracker {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public double getData() { return m_value; }
|
public double getData() { return m_value; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() { m_value = 0; }
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,9 @@ public class ParticipatingTunnelsTracker extends Thread implements Tracker {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public double getData() { return m_value; }
|
public double getData() { return m_value; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() { m_value = 0; }
|
||||||
}
|
}
|
||||||
|
@ -60,4 +60,9 @@ public class RateStatTracker extends Thread implements Tracker {
|
|||||||
* @since 0.0.4
|
* @since 0.0.4
|
||||||
*/
|
*/
|
||||||
public double getData() { return m_value; }
|
public double getData() { return m_value; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.0.4
|
||||||
|
*/
|
||||||
|
public void clearData() { m_value = 0; }
|
||||||
}
|
}
|
||||||
|
@ -6,4 +6,6 @@ package net.i2p.itoopie.gui.component.chart;
|
|||||||
public interface Tracker {
|
public interface Tracker {
|
||||||
|
|
||||||
public double getData();
|
public double getData();
|
||||||
|
|
||||||
|
public void clearData();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user