projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stmf0: Not all timer configurations use AF2
[fw/altos]
/
altosuilib
/
AltosUIAxis.java
diff --git
a/altosuilib/AltosUIAxis.java
b/altosuilib/AltosUIAxis.java
index 867b03841bb4100cfaf4298377cb55fd52a990e4..e41667ef906f4f038b9325623ca050ba0638f318 100644
(file)
--- a/
altosuilib/AltosUIAxis.java
+++ b/
altosuilib/AltosUIAxis.java
@@
-3,7
+3,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-15,14
+16,14
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altosuilib_1;
+package org.altusmetrum.altosuilib_1
1
;
import java.io.*;
import java.util.ArrayList;
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.util.ArrayList;
import java.awt.*;
import javax.swing.*;
-import org.altusmetrum.altoslib_1.*;
+import org.altusmetrum.altoslib_1
1
.*;
import org.jfree.ui.*;
import org.jfree.chart.*;
import org.jfree.ui.*;
import org.jfree.chart.*;
@@
-48,9
+49,13
@@
public class AltosUIAxis extends NumberAxis {
public final static int axis_default = axis_include_zero;
public void set_units() {
public final static int axis_default = axis_include_zero;
public void set_units() {
- setLabel(String.format("%s (%s)", label, units.show_units()));
+ String u = units.parse_units();
+ if (u != null)
+ setLabel(String.format("%s (%s)", label, u));
+ else
+ setLabel(label);
}
}
-
+
public void set_enable(boolean enable) {
if (enable) {
visible++;
public void set_enable(boolean enable) {
if (enable) {
visible++;