From: Keith Packard Date: Fri, 1 Mar 2013 20:28:34 +0000 (-0800) Subject: altosuilib: Add setNotify/fireSeriesChanged methods to AltosUIGrapher X-Git-Tag: altosdroid_v1.2-1~102 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=351e4110f519d18bb36747955578e9e5b9aeec7b altosuilib: Add setNotify/fireSeriesChanged methods to AltosUIGrapher This will let the data adding functions disable notifications while adding all of the graph data, and then send a single notification when the data sets are complete, which speeds up creating of the graph elements quite a bit. Signed-off-by: Keith Packard --- diff --git a/altosuilib/AltosUIGrapher.java b/altosuilib/AltosUIGrapher.java index c627fec5..8f0ce801 100644 --- a/altosuilib/AltosUIGrapher.java +++ b/altosuilib/AltosUIGrapher.java @@ -43,4 +43,8 @@ interface AltosUIGrapher { public abstract void add(AltosUIDataPoint dataPoint); public abstract void set_enable(boolean enable); + + public abstract void setNotify(boolean notify); + + public abstract void fireSeriesChanged(); } diff --git a/altosuilib/AltosUIMarker.java b/altosuilib/AltosUIMarker.java index e2eb9028..0949be6f 100644 --- a/altosuilib/AltosUIMarker.java +++ b/altosuilib/AltosUIMarker.java @@ -100,6 +100,12 @@ public class AltosUIMarker implements AltosUIGrapher { this.enabled = enable; } + public void setNotify(boolean notify) { + } + + public void fireSeriesChanged() { + } + public AltosUIMarker (int fetch, Color color, XYPlot plot) { this(fetch, color, plot, true); }