|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.steema.teechart.misc.Utils
public class Utils
Title: misc.Utils class
Description: Chart utility procedures
Copyright (c) 2005-2013 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 double |
atan2(double y,
double x)
Note: This method has been implemented here in Utils class because J2ME Math class does not include it. |
static double |
calcDistance(Point p,
int x0,
int y0,
int x1,
int y1)
|
static boolean |
colorIsEmpty(Color color)
|
static int |
compareDoubles(double d1,
double d2)
Note: This code has been copied from Java JDK Double.compare method, because J2ME Double class does not include it. |
static Color |
darkenColor(Color AColor,
int Percentage)
|
static void |
drawCheckBox(int x,
int y,
IGraphics3D g,
boolean drawChecked,
boolean CheckBox,
Color backColor)
|
static Rectangle |
emptyRectangle()
|
static double |
exp(double a)
Note: This method has been implemented here in Utils class because J2ME Math class does not include it. |
static java.lang.String |
formatFloat(double value)
|
static Rectangle |
fromLTRB(int l,
int t,
int r,
int b)
|
static double |
getDateTimeStep(int value)
Evaluates and returns a steema. |
static Color |
getEmptyColor()
|
static boolean |
intersectWithRect(Rectangle r1,
Rectangle r2)
|
static boolean |
isEmptyRectangle(Rectangle rect)
|
static boolean |
isNullOrEmpty(java.lang.String str)
|
static double |
log(double value)
Note: This function has been added to Utils because J2ME Math class does not include it. |
static double |
log(double x,
double numBase)
|
static int |
MulDiv(int a,
int b,
int c)
|
static PointDouble |
offsetPoint(PointDouble value,
double x,
double y)
|
static Point |
pointAtDistance(Point aFrom,
Point aTo,
int aDist)
|
static boolean |
pointInLineTolerance(Point p,
int x0,
int y0,
int x1,
int y1,
int tolerance)
|
static double |
pow(double a,
double b)
Note: This method has been implemented here in Utils class because J2ME Math class does not include it. |
static double |
rad2Deg(double radian)
|
static double[] |
rationaliseValues(double x,
double y,
double z)
|
static Point[] |
rectToPolygon(Rectangle r)
|
static PointDouble[] |
rectToPolygonDouble(Rectangle r)
|
static java.lang.String |
replaceAll(java.lang.String source,
java.lang.String pattern,
java.lang.String replacement)
|
static int |
round(double value)
Returns the integer nearest to "value" parameter |
static java.lang.Class |
seriesClass(java.lang.String style)
|
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 |
sqr(double x)
|
static double |
stringToDouble(java.lang.String text,
double value)
|
static void |
swapInteger(int a,
int b)
|
static int |
toolTypeIndex(Tool tool)
Returns the index in ToolTypesOf list of a given tool instance. |
static double |
trunc(double d)
Note: This method has been implemented here in Utils class because J2ME Math class does not include it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double PISTEP
public static final java.lang.String BuildNumber
public static final java.lang.String VersionMode
public static final int TOOLTYPESCOUNT
public static final java.lang.Class[] toolTypesOf
public static final int FUNCTIONTYPESCOUNT
public static final java.lang.Class[] functionTypesOf
public static final int[] functionGalleryPage
public static final int SERIESTYPESCOUNT
public static final int[] seriesGalleryCount
public static final int[] seriesGalleryPage
public static final java.lang.Class[] seriesTypesOf
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static java.lang.String formatFloat(double value)
public static double getDateTimeStep(int value)
value
- DateTimeStep
public static double stringToDouble(java.lang.String text, double value)
public static void swapInteger(int a, int b)
public static void sort(int startIndex, int endIndex, Comparator c, Swapper s)
public static void sort(int[] x, int startIndex, int endIndex, Comparator c)
public static int toolTypeIndex(Tool tool)
tool
- Tool to search its type in list
public static int seriesTypesIndex(ISeries s)
public static int seriesTypesIndex(java.lang.Class seriesType)
public static int MulDiv(int a, int b, int c)
public static java.lang.String arrayToString(java.lang.String[] a)
public static java.lang.String arrayToString(java.lang.String[] a, char separator)
public static void drawCheckBox(int x, int y, IGraphics3D g, boolean drawChecked, boolean CheckBox, Color backColor)
public static Color getEmptyColor()
public static boolean colorIsEmpty(Color color)
public static Color darkenColor(Color AColor, int Percentage)
public static int round(double value)
value
- double
public static double calcDistance(Point p, int x0, int y0, int x1, int y1)
public static final double sqr(double x)
public static double log(double value)
value
- double
public static double log(double x, double numBase)
public static Point pointAtDistance(Point aFrom, Point aTo, int aDist)
public static boolean isNullOrEmpty(java.lang.String str)
public static Rectangle emptyRectangle()
public static boolean isEmptyRectangle(Rectangle rect)
public static Rectangle fromLTRB(int l, int t, int r, int b)
public static boolean pointInLineTolerance(Point p, int x0, int y0, int x1, int y1, int tolerance)
public static boolean intersectWithRect(Rectangle r1, Rectangle r2)
public static int compareDoubles(double d1, double d2)
d1
- doubled2
- double
public static double atan2(double y, double x)
y
- doublex
- double
public static double pow(double a, double b)
a
- doubleb
- double
public static PointDouble offsetPoint(PointDouble value, double x, double y)
public static double rad2Deg(double radian)
public static double exp(double a)
a
- double
public static double trunc(double d)
d
- double
public static Point[] rectToPolygon(Rectangle r)
public static PointDouble[] rectToPolygonDouble(Rectangle r)
public static java.lang.Class seriesClass(java.lang.String style)
public static double[] rationaliseValues(double x, double y, double z)
public static java.lang.String replaceAll(java.lang.String source, java.lang.String pattern, java.lang.String replacement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |