X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosGraphTime.java;h=a5451280ca9d0d4a486e8f95b5edcfb430868c0f;hp=c0f99c596d939381a4d483772e8e018b037fa240;hb=939be6793238a275b7682ecc376fed14379cf044;hpb=7ef3ad0c9354c0484c25badc69334b59c7f355e2 diff --git a/ao-tools/altosui/AltosGraphTime.java b/ao-tools/altosui/AltosGraphTime.java index c0f99c59..a5451280 100644 --- a/ao-tools/altosui/AltosGraphTime.java +++ b/ao-tools/altosui/AltosGraphTime.java @@ -24,9 +24,6 @@ import org.jfree.data.xy.XYSeriesCollection; import org.jfree.ui.RectangleAnchor; import org.jfree.ui.TextAnchor; -import altosui.AltosDataPoint; -import altosui.AltosGraph; - class AltosGraphTime extends AltosGraph { static interface Element { void attachGraph(AltosGraphTime g); @@ -131,6 +128,10 @@ class AltosGraphTime extends AltosGraph { } } + private String callsign = null; + private Integer serial = null; + private Integer flight = null; + private String title; private ArrayList elements; private HashMap axes; @@ -186,6 +187,9 @@ class AltosGraphTime extends AltosGraph { for (Element e : elements) { e.gotTimeData(time, d); } + if (callsign == null) callsign = d.callsign(); + if (serial == null) serial = new Integer(d.serial()); + if (flight == null) flight = new Integer(d.flight()); } public JFreeChart createChart() { @@ -197,6 +201,13 @@ class AltosGraphTime extends AltosGraph { plot.setRenderer(renderer); plot.setOrientation(PlotOrientation.VERTICAL); + if (serial != null && flight != null) { + title = serial + "/" + flight + ": " + title; + } + if (callsign != null) { + title = callsign + " - " + title; + } + renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, true);