X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIMarker.java;h=ec5aae7813740aeb2e0a650d54c085549b623b86;hp=560153f285f64a53f13d6aa4958121095708f5d7;hb=d6445b3739ac2c5dd040efdb97317a6b2a48044a;hpb=0169e56ad030c0096b1068d00f06957990dfb31f diff --git a/altosuilib/AltosUIMarker.java b/altosuilib/AltosUIMarker.java index 560153f2..ec5aae78 100644 --- a/altosuilib/AltosUIMarker.java +++ b/altosuilib/AltosUIMarker.java @@ -15,14 +15,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_1; +package org.altusmetrum.altosuilib_8; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_1.*; +import org.altusmetrum.altoslib_8.*; import org.jfree.ui.*; import org.jfree.chart.*; @@ -41,7 +41,7 @@ public class AltosUIMarker implements AltosUIGrapher { boolean enabled; int fetch; Color color; - + private void remove_markers() { for (ValueMarker marker : markers) plot.removeDomainMarker(marker); @@ -72,20 +72,23 @@ public class AltosUIMarker implements AltosUIGrapher { } public void add(AltosUIDataPoint dataPoint) { - int id = dataPoint.id(fetch); - if (id < 0) - return; - if (id == last_id) - return; - ValueMarker marker = new ValueMarker(dataPoint.x()); - marker.setLabel(dataPoint.id_name(fetch)); - marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT); - marker.setLabelTextAnchor(TextAnchor.TOP_LEFT); - marker.setPaint(color); - if (enabled) - plot.addDomainMarker(marker); - markers.add(marker); - last_id = id; + try { + int id = dataPoint.id(fetch); + if (id < 0) + return; + if (id == last_id) + return; + ValueMarker marker = new ValueMarker(dataPoint.x()); + marker.setLabel(dataPoint.id_name(fetch)); + marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT); + marker.setLabelTextAnchor(TextAnchor.TOP_LEFT); + marker.setPaint(color); + if (enabled) + plot.addDomainMarker(marker); + markers.add(marker); + last_id = id; + } catch (AltosUIDataMissing m) { + } } public AltosUIMarker (int fetch, Color color, XYPlot plot, boolean enable) { @@ -97,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); }