org.rosuda.util
Class Tools

java.lang.Object
  extended by org.rosuda.util.Tools

public class Tools
extends java.lang.Object

tools to be used by all other classes

Version:
$Id: Tools.java 2415 2006-05-18 13:13:14Z wichtreyt $

Constructor Summary
Tools()
           
 
Method Summary
static java.lang.String color2hrgb(java.awt.Color c)
           
static java.lang.String getDisplayableValue(double val)
           
static java.lang.String getDisplayableValue(double val, double range)
           
static java.lang.String getDisplayableValue(double val, int dac)
           
static java.io.PrintStream getNewOutputStreamDlg(java.awt.Frame par, java.lang.String title, java.lang.String deffn)
          displays a dialog box to save a file and returns the corresponding printstream for the newly created file
static java.awt.Color hrgb2color(java.lang.String s)
           
static double nlogn(double n)
           
static double nlogn(int n)
           
static double parseDouble(java.lang.String s)
           
static int parseHexInt(java.lang.String s)
           
static long parseHexLong(java.lang.String s)
           
static int parseInt(java.lang.String s)
           
static int[] sortDoublesIndex(double[] da)
           
static int[] sortIntegersIndex(int[] da)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools

public Tools()
Method Detail

getNewOutputStreamDlg

public static java.io.PrintStream getNewOutputStreamDlg(java.awt.Frame par,
                                                        java.lang.String title,
                                                        java.lang.String deffn)
displays a dialog box to save a file and returns the corresponding printstream for the newly created file

Returns:
null if create failed or user canceled operation, the PrintStream otherwise.

nlogn

public static double nlogn(double n)

nlogn

public static double nlogn(int n)

sortDoublesIndex

public static int[] sortDoublesIndex(double[] da)

sortIntegersIndex

public static int[] sortIntegersIndex(int[] da)

getDisplayableValue

public static java.lang.String getDisplayableValue(double val)

getDisplayableValue

public static java.lang.String getDisplayableValue(double val,
                                                   double range)

getDisplayableValue

public static java.lang.String getDisplayableValue(double val,
                                                   int dac)

parseDouble

public static double parseDouble(java.lang.String s)

parseInt

public static int parseInt(java.lang.String s)

parseHexInt

public static int parseHexInt(java.lang.String s)

parseHexLong

public static long parseHexLong(java.lang.String s)

color2hrgb

public static java.lang.String color2hrgb(java.awt.Color c)

hrgb2color

public static java.awt.Color hrgb2color(java.lang.String s)