com.steema.teechart.misc
Class Utils

java.lang.Object
  extended by com.steema.teechart.misc.Utils

public class Utils
extends java.lang.Object

Title: misc.Utils class

Description: Chart utility procedures

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Field Summary
static java.lang.String BuildNumber
           
static int[] functionGalleryPage
           
static int FUNCTIONTYPESCOUNT
          Number of chart Function types.
static java.lang.Class[] functionTypesOf
          List of chart Function types.
static double PISTEP
           
static int[] seriesGalleryCount
           
static int[] seriesGalleryPage
           
static int SERIESTYPESCOUNT
           
static java.lang.Class[] seriesTypesOf
           
static int TOOLTYPESCOUNT
          Number of chart Tool types.
static java.lang.Class[] toolTypesOf
          List of chart Tool classes.
static java.lang.String VersionMode
           
 
Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String arrayToString(java.lang.String[] a)
           
static java.lang.String arrayToString(java.lang.String[] a, char separator)
           
static java.lang.String dateTimeToDateTimeStr(DateTime datetime)
           
static java.lang.String dateTimeToStr(DateTime datetime)
           
static java.lang.String dateTimeToStr(double datetime)
           
static java.io.InputStream downloadURLStream(java.lang.String url)
           
static java.lang.String downloadURLString(java.lang.String url)
           
static void drawCheckBox(int x, int y, IGraphics3D g, boolean drawChecked, boolean CheckBox, java.awt.Color backColor)
           
static double getDateTimeStep(int value)
          Evaluates and returns a steema.teechart.DateTimeStep value as an Axis double scale that may be used to set the steema.teechart.Axis.Increment.
static int MulDiv(int a, int b, int c)
           
static int seriesTypesIndex(java.lang.Class seriesType)
           
static int seriesTypesIndex(ISeries s)
           
static void sort(int[] x, int startIndex, int endIndex, Comparator c)
           
static void sort(int startIndex, int endIndex, Comparator c, Swapper s)
           
static double stringToDouble(java.lang.String text, double value)
           
static void swapInteger(int a, int b)
           
static java.lang.String timeToStr(DateTime datetime)
           
static java.lang.String timeToStr(double datetime)
           
static int toolTypeIndex(Tool tool)
          Returns the index in ToolTypesOf list of a given tool instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PISTEP

public static final double PISTEP
See Also:
Constant Field Values

BuildNumber

public static final java.lang.String BuildNumber
See Also:
Constant Field Values

VersionMode

public static final java.lang.String VersionMode
See Also:
Constant Field Values

TOOLTYPESCOUNT

public static final int TOOLTYPESCOUNT
Number of chart Tool types.

See Also:
Constant Field Values

toolTypesOf

public static final java.lang.Class[] toolTypesOf
List of chart Tool classes.


FUNCTIONTYPESCOUNT

public static final int FUNCTIONTYPESCOUNT
Number of chart Function types.

See Also:
Constant Field Values

functionTypesOf

public static final java.lang.Class[] functionTypesOf
List of chart Function types.


functionGalleryPage

public static final int[] functionGalleryPage

SERIESTYPESCOUNT

public static final int SERIESTYPESCOUNT
See Also:
Constant Field Values

seriesGalleryCount

public static final int[] seriesGalleryCount

seriesGalleryPage

public static final int[] seriesGalleryPage

seriesTypesOf

public static final java.lang.Class[] seriesTypesOf
Constructor Detail

Utils

public Utils()
Method Detail

getDateTimeStep

public static double getDateTimeStep(int value)
Evaluates and returns a steema.teechart.DateTimeStep value as an Axis double scale that may be used to set the steema.teechart.Axis.Increment.

Parameters:
value - DateTimeStep
Returns:
double

stringToDouble

public static double stringToDouble(java.lang.String text,
                                    double value)

swapInteger

public static void swapInteger(int a,
                               int b)

sort

public static void sort(int startIndex,
                        int endIndex,
                        Comparator c,
                        Swapper s)

sort

public static void sort(int[] x,
                        int startIndex,
                        int endIndex,
                        Comparator c)

toolTypeIndex

public static int toolTypeIndex(Tool tool)
Returns the index in ToolTypesOf list of a given tool instance.

Parameters:
tool - Tool to search its type in list
Returns:
int

seriesTypesIndex

public static int seriesTypesIndex(ISeries s)

seriesTypesIndex

public static int seriesTypesIndex(java.lang.Class seriesType)

downloadURLStream

public static java.io.InputStream downloadURLStream(java.lang.String url)
                                             throws java.net.MalformedURLException,
                                                    java.io.IOException
Throws:
java.net.MalformedURLException
java.io.IOException

downloadURLString

public static java.lang.String downloadURLString(java.lang.String url)
                                          throws java.io.IOException
Throws:
java.io.IOException

MulDiv

public static int MulDiv(int a,
                         int b,
                         int c)

dateTimeToStr

public static java.lang.String dateTimeToStr(double datetime)

dateTimeToStr

public static java.lang.String dateTimeToStr(DateTime datetime)

dateTimeToDateTimeStr

public static java.lang.String dateTimeToDateTimeStr(DateTime datetime)

timeToStr

public static java.lang.String timeToStr(double datetime)

timeToStr

public static java.lang.String timeToStr(DateTime datetime)

arrayToString

public static java.lang.String arrayToString(java.lang.String[] a)

arrayToString

public static java.lang.String arrayToString(java.lang.String[] a,
                                             char separator)

drawCheckBox

public static void drawCheckBox(int x,
                                int y,
                                IGraphics3D g,
                                boolean drawChecked,
                                boolean CheckBox,
                                java.awt.Color backColor)