1 46 47 package org.jfree.chart.axis; 48 49 import java.io.Serializable ; 50 import java.text.NumberFormat ; 51 52 55 public class NumberTickUnit extends TickUnit implements Serializable { 56 57 58 private static final long serialVersionUID = 3849459506627654442L; 59 60 61 private NumberFormat formatter; 62 63 68 public NumberTickUnit(double size) { 69 this(size, NumberFormat.getNumberInstance()); 70 } 71 72 78 public NumberTickUnit(double size, NumberFormat formatter) { 79 super(size); 80 this.formatter = formatter; 81 } 82 83 90 public String valueToString(double value) { 91 return this.formatter.format(value); 92 } 93 94 } 95 | Popular Tags |