本文整理汇总了Java中org.jfree.chart.axis.TickUnitSource类的典型用法代码示例。如果您正苦于以下问题:Java TickUnitSource类的具体用法?Java TickUnitSource怎么用?Java TickUnitSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TickUnitSource类属于org.jfree.chart.axis包,在下文中一共展示了TickUnitSource类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createWordedTimeTickUnits
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
/**
* Returns a collection of tick units for integer values.
*/
public static TickUnitSource createWordedTimeTickUnits() {
final TickUnits units = new TickUnits();
units.add(new WordedTimeTickUnit(1));
units.add(new WordedTimeTickUnit(2));
units.add(new WordedTimeTickUnit(5));
units.add(new WordedTimeTickUnit(10));
units.add(new WordedTimeTickUnit(20));
units.add(new WordedTimeTickUnit(50));
units.add(new WordedTimeTickUnit(100));
units.add(new WordedTimeTickUnit(200));
units.add(new WordedTimeTickUnit(500));
units.add(new WordedTimeTickUnit(1000));
units.add(new WordedTimeTickUnit(2000));
units.add(new WordedTimeTickUnit(5000));
units.add(new WordedTimeTickUnit(10000));
units.add(new WordedTimeTickUnit(20000));
units.add(new WordedTimeTickUnit(50000));
units.add(new WordedTimeTickUnit(100000));
units.add(new WordedTimeTickUnit(200000));
units.add(new WordedTimeTickUnit(500000));
units.add(new WordedTimeTickUnit(1000000));
units.add(new WordedTimeTickUnit(2000000));
units.add(new WordedTimeTickUnit(5000000));
units.add(new WordedTimeTickUnit(10000000));
units.add(new WordedTimeTickUnit(20000000));
units.add(new WordedTimeTickUnit(50000000));
units.add(new WordedTimeTickUnit(100000000));
units.add(new WordedTimeTickUnit(200000000));
units.add(new WordedTimeTickUnit(500000000));
units.add(new WordedTimeTickUnit(1000000000));
units.add(new WordedTimeTickUnit(2000000000));
units.add(new WordedTimeTickUnit(5000000000.0));
units.add(new WordedTimeTickUnit(10000000000.0));
return units;
}
示例2: createIntegerTickUnits
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
public TickUnitSource createIntegerTickUnits(Locale locale)
{
DecimalFormatSymbols formatSymbols = DecimalFormatSymbols.getInstance(locale);
// copied from NumberAxis.createIntegerTickUnits() to preserve backward behaviour
TickUnits units = new TickUnits();
DecimalFormat df0 = new DecimalFormat("0", formatSymbols);
DecimalFormat df1 = new DecimalFormat("#,##0", formatSymbols);
units.add(new NumberTickUnit(1, df0));
units.add(new NumberTickUnit(2, df0));
units.add(new NumberTickUnit(5, df0));
units.add(new NumberTickUnit(10, df0));
units.add(new NumberTickUnit(20, df0));
units.add(new NumberTickUnit(50, df0));
units.add(new NumberTickUnit(100, df0));
units.add(new NumberTickUnit(200, df0));
units.add(new NumberTickUnit(500, df0));
units.add(new NumberTickUnit(1000, df1));
units.add(new NumberTickUnit(2000, df1));
units.add(new NumberTickUnit(5000, df1));
units.add(new NumberTickUnit(10000, df1));
units.add(new NumberTickUnit(20000, df1));
units.add(new NumberTickUnit(50000, df1));
units.add(new NumberTickUnit(100000, df1));
units.add(new NumberTickUnit(200000, df1));
units.add(new NumberTickUnit(500000, df1));
units.add(new NumberTickUnit(1000000, df1));
units.add(new NumberTickUnit(2000000, df1));
units.add(new NumberTickUnit(5000000, df1));
units.add(new NumberTickUnit(10000000, df1));
units.add(new NumberTickUnit(20000000, df1));
units.add(new NumberTickUnit(50000000, df1));
units.add(new NumberTickUnit(100000000, df1));
units.add(new NumberTickUnit(200000000, df1));
units.add(new NumberTickUnit(500000000, df1));
units.add(new NumberTickUnit(1000000000, df1));
units.add(new NumberTickUnit(2000000000, df1));
units.add(new NumberTickUnit(5000000000.0, df1));
units.add(new NumberTickUnit(10000000000.0, df1));
// adding further values by default because 1E10 is not enough for some people
// using getNumberInstance because that's what NumberAxis.createIntegerTickUnits does
units.add(new NumberTickUnit(20000000000L, df1));
units.add(new NumberTickUnit(50000000000L, df1));
units.add(new NumberTickUnit(100000000000L, df1));
units.add(new NumberTickUnit(200000000000L, df1));
units.add(new NumberTickUnit(500000000000L, df1));
units.add(new NumberTickUnit(1000000000000L, df1));
units.add(new NumberTickUnit(2000000000000L, df1));
units.add(new NumberTickUnit(5000000000000L, df1));
units.add(new NumberTickUnit(10000000000000L, df1));
units.add(new NumberTickUnit(20000000000000L, df1));
units.add(new NumberTickUnit(50000000000000L, df1));
units.add(new NumberTickUnit(100000000000000L, df1));
units.add(new NumberTickUnit(200000000000000L, df1));
units.add(new NumberTickUnit(500000000000000L, df1));
units.add(new NumberTickUnit(1000000000000000L, df1));
units.add(new NumberTickUnit(2000000000000000L, df1));
units.add(new NumberTickUnit(5000000000000000L, df1));
units.add(new NumberTickUnit(10000000000000000L, df1));
units.add(new NumberTickUnit(20000000000000000L, df1));
units.add(new NumberTickUnit(50000000000000000L, df1));
units.add(new NumberTickUnit(100000000000000000L, df1));
units.add(new NumberTickUnit(200000000000000000L, df1));
units.add(new NumberTickUnit(500000000000000000L, df1));
units.add(new NumberTickUnit(1000000000000000000L, df1));
units.add(new NumberTickUnit(2000000000000000000L, df1));
units.add(new NumberTickUnit(5000000000000000000L, df1));
return units;
}
示例3: getInstance
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
public static TickUnitSource getInstance(int labelFormat) {
return new TickUnitSourceImpl(labelFormat);
}
示例4: TickUnitsImpl
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
/**
* Constructor of the class
* @param tus
*/
public TickUnitsImpl(TickUnitSource tus, int labelFormat) {
this.tus=tus;
this.labelFormat=labelFormat;
}
示例5: createAxis
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
/**
* Creates and returns a new Y axis.
*
* @param axisDescription
* an XML element with the description of the axis.
* @param source
* the tick unit source.
* @return a new Y axis.
*/
private static NumberAxis createAxis(Parameters axisDescription, TickUnitSource source) {
final JamelAxis axis;
axis = new JamelAxis(null);
/*final NumberAxis axis;
if (description != null && description.getAttribute("logarithmic").equals("true")) {
axis = new LogarithmicAxis(null);
} else {
axis = new NumberAxis(null);
axis.setAutoTickUnitSelection(true);
if (source != null) {
axis.setStandardTickUnits(source);
}
axis.setAutoRangeIncludesZero(false);
}*/
if (axisDescription != null && !axisDescription.getAttribute("label").equals("")) {
axis.setLabel(axisDescription.getAttribute("label"));
}
if (axisDescription != null && !axisDescription.getAttribute("integerUnit").isEmpty()) {
axis.setIntegerUnit(Boolean.parseBoolean(axisDescription.getAttribute("integerUnit")));
}
// axis.setTickLabelFont(tickLabelFont);
if (axisDescription != null) {
final Double max = axisDescription.getDoubleAttribute("max");
if (max != null) {
axis.setUpperBound(max);
}
final Double min = axisDescription.getDoubleAttribute("min");
if (min != null) {
/*if (max == null && min == 0) {
axis.setAutoRangeIncludesZero(true);
} else*/ {
axis.setLowerBound(min);
}
}
}
axis.setNumberFormatOverride(NumberFormat.getInstance(Locale.US));
return axis;
}
示例6: LowerBoundedTickUnitSource
import org.jfree.chart.axis.TickUnitSource; //导入依赖的package包/类
/**
* Constructs a new LowerBoundedTickUnitSource. The lowest TickUnit
* returned by this TickUnitSource will be
* {@code decorated.getCeilingTickUnit(lowerBound)}.
*
* @param decorated the default TickUnitSource
* @param lowerBound the lower bound
*/
public LowerBoundedTickUnitSource(TickUnitSource decorated, double lowerBound) {
this.decorated = decorated;
this.lowerUnit = decorated.getCeilingTickUnit(lowerBound);
}