1 /* ============================================================
2 * JRobin : Pure java implementation of RRDTool's functionality
3 * ============================================================
4 *
5 * Project Info: http://www.jrobin.org
6 * Project Lead: Sasa Markovic (saxon@jrobin.org)
7 *
8 * Developers: Sasa Markovic (saxon@jrobin.org)
9 *
10 *
11 * (C) Copyright 2003-2005, by Sasa Markovic.
12 *
13 * This library is free software; you can redistribute it and/or modify it under the terms
14 * of the GNU Lesser General Public License as published by the Free Software Foundation;
15 * either version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
18 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 * See the GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License along with this
22 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23 * Boston, MA 02111-1307, USA.
24 */
25 package org.jrobin.graph;
26
27 class TimeAxisSetting {
28 final long secPerPix;
29 final int minorUnit, minorUnitCount, majorUnit, majorUnitCount;
30 final int labelUnit, labelUnitCount, labelSpan;
31 final String format;
32
33 TimeAxisSetting(long secPerPix, int minorUnit, int minorUnitCount, int majorUnit, int majorUnitCount,
34 int labelUnit, int labelUnitCount, int labelSpan, String format) {
35 this.secPerPix = secPerPix;
36 this.minorUnit = minorUnit;
37 this.minorUnitCount = minorUnitCount;
38 this.majorUnit = majorUnit;
39 this.majorUnitCount = majorUnitCount;
40 this.labelUnit = labelUnit;
41 this.labelUnitCount = labelUnitCount;
42 this.labelSpan = labelSpan;
43 this.format = format;
44 }
45
46 TimeAxisSetting(TimeAxisSetting s) {
47 this.secPerPix = s.secPerPix;
48 this.minorUnit = s.minorUnit;
49 this.minorUnitCount = s.minorUnitCount;
50 this.majorUnit = s.majorUnit;
51 this.majorUnitCount = s.majorUnitCount;
52 this.labelUnit = s.labelUnit;
53 this.labelUnitCount = s.labelUnitCount;
54 this.labelSpan = s.labelSpan;
55 this.format = s.format;
56 }
57
58 TimeAxisSetting(int minorUnit, int minorUnitCount, int majorUnit, int majorUnitCount,
59 int labelUnit, int labelUnitCount, int labelSpan, String format) {
60 this(0, minorUnit, minorUnitCount, majorUnit, majorUnitCount,
61 labelUnit, labelUnitCount, labelSpan, format);
62 }
63
64 }
65