org.jfree.chart.util.LogFormat Java Examples

The following examples show how to use org.jfree.chart.util.LogFormat. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LogAxis.java    From openstock with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #2
Source File: LogAxis.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: LogAxis.java    From SIMVA-SoS with Apache License 2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: LogAxis.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #5
Source File: LogAxis.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #6
Source File: LogAxis.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source File: LogAxis.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #8
Source File: LogFormatTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example #9
Source File: LogFormatTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
}