本文整理汇总了Java中org.jfree.chart.axis.PeriodAxis.setTimeZone方法的典型用法代码示例。如果您正苦于以下问题:Java PeriodAxis.setTimeZone方法的具体用法?Java PeriodAxis.setTimeZone怎么用?Java PeriodAxis.setTimeZone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.axis.PeriodAxis
的用法示例。
在下文中一共展示了PeriodAxis.setTimeZone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.chart.axis.PeriodAxis; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
PeriodAxis a1 = new PeriodAxis("Test");
PeriodAxis a2 = new PeriodAxis("Test");
assertTrue(a1.equals(a2));
assertTrue(a2.equals(a1));
a1.setFirst(new Year(2000));
assertFalse(a1.equals(a2));
a2.setFirst(new Year(2000));
assertTrue(a1.equals(a2));
a1.setLast(new Year(2004));
assertFalse(a1.equals(a2));
a2.setLast(new Year(2004));
assertTrue(a1.equals(a2));
a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertFalse(a1.equals(a2));
a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertTrue(a1.equals(a2));
a1.setAutoRangeTimePeriodClass(Quarter.class);
assertFalse(a1.equals(a2));
a2.setAutoRangeTimePeriodClass(Quarter.class);
assertTrue(a1.equals(a2));
PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
info[0] = new PeriodAxisLabelInfo(Month.class, "MMM");
a1.setLabelInfo(info);
assertFalse(a1.equals(a2));
a2.setLabelInfo(info);
assertTrue(a1.equals(a2));
}
示例2: testEquals
import org.jfree.chart.axis.PeriodAxis; //导入方法依赖的package包/类
/**
* Confirm that the equals() method can distinguish all the required fields.
*/
public void testEquals() {
PeriodAxis a1 = new PeriodAxis("Test");
PeriodAxis a2 = new PeriodAxis("Test");
assertTrue(a1.equals(a2));
assertTrue(a2.equals(a1));
a1.setFirst(new Year(2000));
assertFalse(a1.equals(a2));
a2.setFirst(new Year(2000));
assertTrue(a1.equals(a2));
a1.setLast(new Year(2004));
assertFalse(a1.equals(a2));
a2.setLast(new Year(2004));
assertTrue(a1.equals(a2));
a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertFalse(a1.equals(a2));
a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertTrue(a1.equals(a2));
a1.setAutoRangeTimePeriodClass(Quarter.class);
assertFalse(a1.equals(a2));
a2.setAutoRangeTimePeriodClass(Quarter.class);
assertTrue(a1.equals(a2));
PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
info[0] = new PeriodAxisLabelInfo(
Month.class, new SimpleDateFormat("MMM")
);
a1.setLabelInfo(info);
assertFalse(a1.equals(a2));
a2.setLabelInfo(info);
assertTrue(a1.equals(a2));
a1.setMajorTickTimePeriodClass(Minute.class);
assertFalse(a1.equals(a2));
a2.setMajorTickTimePeriodClass(Minute.class);
assertTrue(a1.equals(a2));
a1.setMinorTickMarksVisible(!a1.isMinorTickMarksVisible());
assertFalse(a1.equals(a2));
a2.setMinorTickMarksVisible(a1.isMinorTickMarksVisible());
assertTrue(a1.equals(a2));
a1.setMinorTickTimePeriodClass(Minute.class);
assertFalse(a1.equals(a2));
a2.setMinorTickTimePeriodClass(Minute.class);
assertTrue(a1.equals(a2));
Stroke s = new BasicStroke(1.23f);
a1.setMinorTickMarkStroke(s);
assertFalse(a1.equals(a2));
a2.setMinorTickMarkStroke(s);
assertTrue(a1.equals(a2));
a1.setMinorTickMarkPaint(Color.blue);
assertFalse(a1.equals(a2));
a2.setMinorTickMarkPaint(Color.blue);
assertTrue(a1.equals(a2));
}
示例3: testEquals
import org.jfree.chart.axis.PeriodAxis; //导入方法依赖的package包/类
/**
* Confirm that the equals() method can distinguish all the required fields.
*/
public void testEquals() {
PeriodAxis a1 = new PeriodAxis("Test");
PeriodAxis a2 = new PeriodAxis("Test");
assertTrue(a1.equals(a2));
assertTrue(a2.equals(a1));
a1.setFirst(new Year(2000));
assertFalse(a1.equals(a2));
a2.setFirst(new Year(2000));
assertTrue(a1.equals(a2));
a1.setLast(new Year(2004));
assertFalse(a1.equals(a2));
a2.setLast(new Year(2004));
assertTrue(a1.equals(a2));
a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertFalse(a1.equals(a2));
a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
assertTrue(a1.equals(a2));
a1.setAutoRangeTimePeriodClass(Quarter.class);
assertFalse(a1.equals(a2));
a2.setAutoRangeTimePeriodClass(Quarter.class);
assertTrue(a1.equals(a2));
PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
info[0] = new PeriodAxisLabelInfo(Month.class,
new SimpleDateFormat("MMM"));
a1.setLabelInfo(info);
assertFalse(a1.equals(a2));
a2.setLabelInfo(info);
assertTrue(a1.equals(a2));
a1.setMajorTickTimePeriodClass(Minute.class);
assertFalse(a1.equals(a2));
a2.setMajorTickTimePeriodClass(Minute.class);
assertTrue(a1.equals(a2));
a1.setMinorTickMarksVisible(!a1.isMinorTickMarksVisible());
assertFalse(a1.equals(a2));
a2.setMinorTickMarksVisible(a1.isMinorTickMarksVisible());
assertTrue(a1.equals(a2));
a1.setMinorTickTimePeriodClass(Minute.class);
assertFalse(a1.equals(a2));
a2.setMinorTickTimePeriodClass(Minute.class);
assertTrue(a1.equals(a2));
Stroke s = new BasicStroke(1.23f);
a1.setMinorTickMarkStroke(s);
assertFalse(a1.equals(a2));
a2.setMinorTickMarkStroke(s);
assertTrue(a1.equals(a2));
a1.setMinorTickMarkPaint(Color.blue);
assertFalse(a1.equals(a2));
a2.setMinorTickMarkPaint(Color.blue);
assertTrue(a1.equals(a2));
}