本文整理汇总了Java中org.jfree.chart.util.LogFormat类的典型用法代码示例。如果您正苦于以下问题:Java LogFormat类的具体用法?Java LogFormat怎么用?Java LogFormat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LogFormat类属于org.jfree.chart.util包,在下文中一共展示了LogFormat类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLogTickUnits
import org.jfree.chart.util.LogFormat; //导入依赖的package包/类
/**
* Returns a collection of tick units for log (base 10) values.
* Uses a given Locale to create the DecimalFormats.
*
* @param locale the locale to use to represent Numbers.
*
* @return A collection of tick units for integer values.
*
* @since 1.0.7
*
* @deprecated This method is no longer used internally and will be removed
* from a future version. If you need this method, copy the source
* code into your project.
*/
public static TickUnitSource createLogTickUnits(Locale locale) {
TickUnits units = new TickUnits();
NumberFormat numberFormat = new LogFormat();
units.add(new NumberTickUnit(0.05, numberFormat, 2));
units.add(new NumberTickUnit(0.1, numberFormat, 10));
units.add(new NumberTickUnit(0.2, numberFormat, 2));
units.add(new NumberTickUnit(0.5, numberFormat, 5));
units.add(new NumberTickUnit(1, numberFormat, 10));
units.add(new NumberTickUnit(2, numberFormat, 10));
units.add(new NumberTickUnit(3, numberFormat, 15));
units.add(new NumberTickUnit(4, numberFormat, 20));
units.add(new NumberTickUnit(5, numberFormat, 25));
units.add(new NumberTickUnit(6, numberFormat));
units.add(new NumberTickUnit(7, numberFormat));
units.add(new NumberTickUnit(8, numberFormat));
units.add(new NumberTickUnit(9, numberFormat));
units.add(new NumberTickUnit(10, numberFormat));
return units;
}
示例2: createLogTickUnits
import org.jfree.chart.util.LogFormat; //导入依赖的package包/类
/**
* Returns a collection of tick units for log (base 10) values.
* Uses a given Locale to create the DecimalFormats.
*
* @param locale the locale to use to represent Numbers.
*
* @return A collection of tick units for integer values.
*
* @since 1.0.7
*/
public static TickUnitSource createLogTickUnits(Locale locale) {
TickUnits units = new TickUnits();
NumberFormat numberFormat = new LogFormat();
units.add(new NumberTickUnit(0.05, numberFormat, 2));
units.add(new NumberTickUnit(0.1, numberFormat, 10));
units.add(new NumberTickUnit(0.2, numberFormat, 2));
units.add(new NumberTickUnit(0.5, numberFormat, 5));
units.add(new NumberTickUnit(1, numberFormat, 10));
units.add(new NumberTickUnit(2, numberFormat, 10));
units.add(new NumberTickUnit(3, numberFormat, 15));
units.add(new NumberTickUnit(4, numberFormat, 20));
units.add(new NumberTickUnit(5, numberFormat, 25));
units.add(new NumberTickUnit(6, numberFormat));
units.add(new NumberTickUnit(7, numberFormat));
units.add(new NumberTickUnit(8, numberFormat));
units.add(new NumberTickUnit(9, numberFormat));
units.add(new NumberTickUnit(10, numberFormat));
return units;
}
示例3: testHashcode
import org.jfree.chart.util.LogFormat; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
LogFormat f1 = new LogFormat(10.0, "10", true);
LogFormat f2 = new LogFormat(10.0, "10", true);
assertTrue(f1.equals(f2));
int h1 = f1.hashCode();
int h2 = f2.hashCode();
assertEquals(h1, h2);
}