org.freehep.swing.graphics
Class Scale

java.lang.Object
  extended by org.freehep.swing.graphics.Scale

public class Scale
extends Object

This class contains static methods which are useful for the ScaleBorder class and any potential subclasses.

Version:
$Id: Scale.java 8584 2006-08-10 23:06:37Z duns $
Author:
Charles Loomis

Field Summary
static int BOTH_TICKS
           
static int LEFT_TICKS
           
static int RIGHT_TICKS
           
 
Constructor Summary
Scale()
           
 
Method Summary
static void drawLinearScale(double value0, double value1, int scaleSize, int minPrimary, int minSeparation, int location, GeneralPath primaryTicks, GeneralPath secondaryTicks, String[] label, double[] position)
           
static String fixedPrecision(double d, int ndigits)
           
static float getPrimaryTickSize()
          Get the primary tick size (in pixels).
static float getSecondaryTickSize()
          Get the secondary tick size (in pixels).
static void setTickSizes(float primaryTickSize, float secondaryTickSize)
          Set the tick sizes (in pixels) for the primary and secondary tick marks.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT_TICKS

public static final int LEFT_TICKS
See Also:
Constant Field Values

RIGHT_TICKS

public static final int RIGHT_TICKS
See Also:
Constant Field Values

BOTH_TICKS

public static final int BOTH_TICKS
See Also:
Constant Field Values
Constructor Detail

Scale

public Scale()
Method Detail

setTickSizes

public static void setTickSizes(float primaryTickSize,
                                float secondaryTickSize)
Set the tick sizes (in pixels) for the primary and secondary tick marks.


getPrimaryTickSize

public static float getPrimaryTickSize()
Get the primary tick size (in pixels).


getSecondaryTickSize

public static float getSecondaryTickSize()
Get the secondary tick size (in pixels).


drawLinearScale

public static void drawLinearScale(double value0,
                                   double value1,
                                   int scaleSize,
                                   int minPrimary,
                                   int minSeparation,
                                   int location,
                                   GeneralPath primaryTicks,
                                   GeneralPath secondaryTicks,
                                   String[] label,
                                   double[] position)

fixedPrecision

public static String fixedPrecision(double d,
                                    int ndigits)


Copyright © 2000-2013 FreeHEP. All Rights Reserved.