KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > monitorenter > gui > chart > labelformatters > LabelFormatterSimple


1 /*
2  *
3  * LableFormatterSimple.java jchart2d
4  * Copyright (C) Achim Westermann, created on 20.04.2005, 09:54:15
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  * If you modify or optimize the code in a useful way please let me know.
21  * Achim.Westermann@gmx.de
22  *
23  */

24 package info.monitorenter.gui.chart.labelformatters;
25
26 import info.monitorenter.gui.chart.ILabelFormatter;
27
28 import java.text.DecimalFormat JavaDoc;
29
30 /**
31  * <p>
32  * An IlabelFormatter implementation that just returns
33  * <code>String.valueOf(value)</code>.
34  * </p>
35  *
36  * @author <a HREF="mailto:Achim.Westermann@gmx.de">Achim Westermann </a>
37  *
38  * @version $Revision: 1.1 $
39  *
40  */

41 public final class LabelFormatterSimple extends LabelFormatterNumber implements ILabelFormatter {
42   /**
43    * Default constructor that limits the internal maximum fraction digits to 2
44    * and the maximum integer digits to 16.
45    * <p>
46    *
47    */

48   public LabelFormatterSimple() {
49     super(new DecimalFormat JavaDoc("#"));
50     this.m_nf.setMaximumFractionDigits(2);
51     this.m_nf.setMaximumIntegerDigits(16);
52   }
53
54 }
55
Popular Tags