2 * Copyright © 2017 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
15 package org.altusmetrum.altosuilib_11;
20 import org.altusmetrum.altoslib_11.*;
22 class AltosUITimeSeriesExtra {
27 public AltosUITimeSeriesExtra(Color color, boolean enabled, AltosUIAxis axis) {
29 this.enabled = enabled;
34 public class AltosUIFlightSeries extends AltosFlightSeries {
36 Hashtable<String,AltosUITimeSeriesExtra> extra;
38 public void register_extra(String label,
43 AltosUITimeSeriesExtra e = new AltosUITimeSeriesExtra(color,
46 System.out.printf("register extra label %s extra %s\n", label, e);
50 public AltosTimeSeries make_series(String label, AltosUnits units) {
52 AltosUITimeSeriesExtra e = extra.get(label);
55 e = extra.get("default");
56 return new AltosUITimeSeries(label, units,
57 e.color, e.enabled, e.axis);
60 public AltosUITimeSeries[] series() {
61 return series.toArray(new AltosUITimeSeries[0]);
64 public AltosUIFlightSeries () {
66 extra = new Hashtable<String,AltosUITimeSeriesExtra>();