本文整理汇总了Java中org.jfree.data.time.RegularTimePeriod.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java RegularTimePeriod.getClass方法的具体用法?Java RegularTimePeriod.getClass怎么用?Java RegularTimePeriod.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.time.RegularTimePeriod
的用法示例。
在下文中一共展示了RegularTimePeriod.getClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDataset
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a sample dataset.
*
* @param name the dataset name.
* @param base the starting value.
* @param start the starting period.
* @param count the number of values to generate.
*
* @return The dataset.
*/
private static XYDataset createDataset(String name, double base,
RegularTimePeriod start, int count) {
TimeSeries series = new TimeSeries(name, start.getClass());
RegularTimePeriod period = start;
double value = base;
for (int i = 0; i < count; i++) {
series.add(period, value);
period = period.next();
value = value * (1 + (Math.random() - 0.495) / 10.0);
}
TimeSeriesCollection dataset = new TimeSeriesCollection();
dataset.addSeries(series);
return dataset;
}
示例2: PeriodAxis
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a new axis.
*
* @param label the axis label (<code>null</code> permitted).
* @param first the first time period in the axis range
* (<code>null</code> not permitted).
* @param last the last time period in the axis range
* (<code>null</code> not permitted).
* @param timeZone the time zone (<code>null</code> not permitted).
*/
public PeriodAxis(String label,
RegularTimePeriod first, RegularTimePeriod last,
TimeZone timeZone) {
super(label, null);
this.first = first;
this.last = last;
this.timeZone = timeZone;
this.calendar = Calendar.getInstance(timeZone);
this.autoRangeTimePeriodClass = first.getClass();
this.majorTickTimePeriodClass = first.getClass();
this.minorTickMarksVisible = false;
this.minorTickTimePeriodClass = RegularTimePeriod.downsize(
this.majorTickTimePeriodClass);
setAutoRange(true);
this.labelInfo = new PeriodAxisLabelInfo[2];
this.labelInfo[0] = new PeriodAxisLabelInfo(Month.class,
new SimpleDateFormat("MMM"));
this.labelInfo[1] = new PeriodAxisLabelInfo(Year.class,
new SimpleDateFormat("yyyy"));
}
示例3: PeriodAxis
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a new axis.
*
* @param label the axis label (<code>null</code> permitted).
* @param first the first time period in the axis range
* (<code>null</code> not permitted).
* @param last the last time period in the axis range
* (<code>null</code> not permitted).
* @param timeZone the time zone (<code>null</code> not permitted).
*/
public PeriodAxis(String label,
RegularTimePeriod first, RegularTimePeriod last,
TimeZone timeZone) {
super(label, null);
this.first = first;
this.last = last;
this.timeZone = timeZone;
// FIXME: this calendar may need a locale as well
this.calendar = Calendar.getInstance(timeZone);
this.autoRangeTimePeriodClass = first.getClass();
this.majorTickTimePeriodClass = first.getClass();
this.minorTickMarksVisible = false;
this.minorTickTimePeriodClass = RegularTimePeriod.downsize(
this.majorTickTimePeriodClass);
setAutoRange(true);
this.labelInfo = new PeriodAxisLabelInfo[2];
this.labelInfo[0] = new PeriodAxisLabelInfo(Month.class,
new SimpleDateFormat("MMM"));
this.labelInfo[1] = new PeriodAxisLabelInfo(Year.class,
new SimpleDateFormat("yyyy"));
}
示例4: PeriodAxis
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a new axis.
*
* @param label the axis label (<code>null</code> permitted).
* @param first the first time period in the axis range
* (<code>null</code> not permitted).
* @param last the last time period in the axis range
* (<code>null</code> not permitted).
* @param timeZone the time zone (<code>null</code> not permitted).
* @param locale the locale (<code>null</code> not permitted).
*
* @since 1.0.13
*/
public PeriodAxis(String label, RegularTimePeriod first,
RegularTimePeriod last, TimeZone timeZone, Locale locale) {
super(label, null);
ParamChecks.nullNotPermitted(timeZone, "timeZone");
ParamChecks.nullNotPermitted(locale, "locale");
this.first = first;
this.last = last;
this.timeZone = timeZone;
this.locale = locale;
this.calendar = Calendar.getInstance(timeZone, locale);
this.first.peg(this.calendar);
this.last.peg(this.calendar);
this.autoRangeTimePeriodClass = first.getClass();
this.majorTickTimePeriodClass = first.getClass();
this.minorTickMarksVisible = false;
this.minorTickTimePeriodClass = RegularTimePeriod.downsize(
this.majorTickTimePeriodClass);
setAutoRange(true);
this.labelInfo = new PeriodAxisLabelInfo[2];
SimpleDateFormat df0 = new SimpleDateFormat("MMM", locale);
df0.setTimeZone(timeZone);
this.labelInfo[0] = new PeriodAxisLabelInfo(Month.class, df0);
SimpleDateFormat df1 = new SimpleDateFormat("yyyy", locale);
df1.setTimeZone(timeZone);
this.labelInfo[1] = new PeriodAxisLabelInfo(Year.class, df1);
}
示例5: PeriodAxis
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a new axis.
*
* @param label the axis label ({@code null} permitted).
* @param first the first time period in the axis range
* ({@code null} not permitted).
* @param last the last time period in the axis range
* ({@code null} not permitted).
* @param timeZone the time zone ({@code null} not permitted).
* @param locale the locale ({@code null} not permitted).
*
* @since 1.0.13
*/
public PeriodAxis(String label, RegularTimePeriod first,
RegularTimePeriod last, TimeZone timeZone, Locale locale) {
super(label, null);
Args.nullNotPermitted(timeZone, "timeZone");
Args.nullNotPermitted(locale, "locale");
this.first = first;
this.last = last;
this.timeZone = timeZone;
this.locale = locale;
this.calendar = Calendar.getInstance(timeZone, locale);
this.first.peg(this.calendar);
this.last.peg(this.calendar);
this.autoRangeTimePeriodClass = first.getClass();
this.majorTickTimePeriodClass = first.getClass();
this.minorTickMarksVisible = false;
this.minorTickTimePeriodClass = RegularTimePeriod.downsize(
this.majorTickTimePeriodClass);
setAutoRange(true);
this.labelInfo = new PeriodAxisLabelInfo[2];
SimpleDateFormat df0 = new SimpleDateFormat("MMM", locale);
df0.setTimeZone(timeZone);
this.labelInfo[0] = new PeriodAxisLabelInfo(Month.class, df0);
SimpleDateFormat df1 = new SimpleDateFormat("yyyy", locale);
df1.setTimeZone(timeZone);
this.labelInfo[1] = new PeriodAxisLabelInfo(Year.class, df1);
}
示例6: PeriodAxis
import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
* Creates a new axis.
*
* @param label the axis label (<code>null</code> permitted).
* @param first the first time period in the axis range
* (<code>null</code> not permitted).
* @param last the last time period in the axis range
* (<code>null</code> not permitted).
* @param timeZone the time zone (<code>null</code> not permitted).
* @param locale the locale (<code>null</code> not permitted).
*
* @since 1.0.13
*/
public PeriodAxis(String label, RegularTimePeriod first,
RegularTimePeriod last, TimeZone timeZone, Locale locale) {
super(label, null);
if (timeZone == null) {
throw new IllegalArgumentException("Null 'timeZone' argument.");
}
if (locale == null) {
throw new IllegalArgumentException("Null 'locale' argument.");
}
this.first = first;
this.last = last;
this.timeZone = timeZone;
this.locale = locale;
this.calendar = Calendar.getInstance(timeZone, locale);
this.first.peg(this.calendar);
this.last.peg(this.calendar);
this.autoRangeTimePeriodClass = first.getClass();
this.majorTickTimePeriodClass = first.getClass();
this.minorTickMarksVisible = false;
this.minorTickTimePeriodClass = RegularTimePeriod.downsize(
this.majorTickTimePeriodClass);
setAutoRange(true);
this.labelInfo = new PeriodAxisLabelInfo[2];
this.labelInfo[0] = new PeriodAxisLabelInfo(Month.class,
new SimpleDateFormat("MMM", locale));
this.labelInfo[1] = new PeriodAxisLabelInfo(Year.class,
new SimpleDateFormat("yyyy", locale));
}