FreeHEP API
Version current

org.freehep.swing.graphics
Class Scale

java.lang.Object
  extended byorg.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,v 1.1 2000/11/01 08:24:30 loomis Exp $
Author:
Charles Loomis
Source Code:
Scale.java

Field Summary
static int BOTH_TICKS
           
static int LEFT_TICKS
           
protected static float primaryTickSize
          The size in pixels of the primary tick marks.
static int RIGHT_TICKS
           
protected static float secondaryTickSize
          The size in pixels of the secondary tick marks.
 
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
clone, equals, finalize, 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

primaryTickSize

protected static float primaryTickSize
The size in pixels of the primary tick marks. This is a global property for all scales.


secondaryTickSize

protected static float secondaryTickSize
The size in pixels of the secondary tick marks. This is a global property for all scales.

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)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.