001    package railo.runtime.chart;
002    
003    import org.jfree.chart.axis.NumberTickUnit;
004    import org.jfree.chart.axis.TickUnit;
005    
006    public class TicketUnitImpl extends NumberTickUnit {
007    
008            
009            private int labelFormat;
010    
011            /**
012             * Constructor of the class
013             * @param size
014             */
015            public TicketUnitImpl(int labelFormat,double size) {
016                    super(size);
017                    this.labelFormat=labelFormat;
018                    
019            }
020    
021            /**
022             * Constructor of the class
023             * @param unit
024             */
025            public TicketUnitImpl(int labelFormat,TickUnit unit) {
026                    this(labelFormat,unit.getSize());
027            }
028    
029            /**
030             *
031             * @see org.jfree.chart.axis.TickUnit#valueToString(double)
032             */
033            public String valueToString(double value) {
034                    return LabelFormatUtil.format(labelFormat,value);
035            }
036    
037    }