|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvUtil
public final class IlvUtil
IlvUtil is a class that regroups some utilities.
| Method Summary | |
|---|---|
static void |
BoundingBox(IlvRect bbox,
float[] x,
float[] y,
int count)
Computes the bounding rectangle that contains all the points |
static void |
BoundingBox(IlvRect bbox,
IlvPoint[] points,
int count)
Computes the bounding rectangle that contains all the points |
static Cursor |
CursorFromDirection(int direction)
Returns the AWT Cursor from an IlvConstants |
static double |
degreesToRadians(double angle)
Transforms the angle parameter from degrees
into radians. |
static float |
GetDeltaLine()
Returns the size of the margin used by the method PointInLine to detect if a point is on a line. |
static Frame |
GetFrame(Component c)
Returns the Frame window of the component. |
static int |
GetHeadlessScreenResolution()
Returns the screen resolution used in headless mode. |
static Image |
GetImageFromFile(Class baseClass,
String file)
Deprecated. Beginning with JViews 5.5 use IlvImageUtil.getImageFromFile(java.lang.Class, java.lang.String) instead. |
static IlvPoint |
GetLineIntersection(double ax1,
double ay1,
double ax2,
double ay2,
double bx1,
double by1,
double bx2,
double by2,
IlvPoint result)
Returns the intersection point between two lines. |
static IlvPoint |
GetLineIntersection(IlvPoint p1LA,
IlvPoint p2LA,
IlvPoint p1LB,
IlvPoint p2LB,
IlvPoint result)
Returns the intersection point between two lines. |
static int |
GetMinorVersion()
Deprecated. Please use IlvFrameworkProduct.getMinorVersion() instead. |
static int |
GetPatchLevel()
Deprecated. Please use IlvFrameworkProduct.getPatchLevel() instead. |
static int |
GetSubMinorVersion()
Deprecated. Please use IlvFrameworkProduct.getSubMinorVersion() instead. |
static int |
GetVersion()
Deprecated. Please use IlvFrameworkProduct.getVersion() instead. |
static boolean |
PointInLine(IlvPoint point,
IlvPoint from,
IlvPoint to)
Returns true if the first specified point is on the line
described by the two other points. |
static boolean |
PointInLine(IlvPoint point,
IlvPoint from,
IlvPoint to,
boolean noMarginAtExtremities)
Returns true if the first specified point is on the line described by the
two other points. |
static double |
radiansToDegrees(double angle)
Transforms the angle parameter from radians
into degrees. |
static void |
registerKey(String key)
Deprecated. Beginning with JViews 6.0, runtime keys are stored in a file called "deploy.txt" inside the application jar file. This method has no effect any more. You need to use the method IlvProductUtil.registerApplication(java.lang.String)
instead. |
static void |
SetDeltaLine(float val)
Changes the size of the margin used by the method PointInLine(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvPoint) to detect if a point is on a line. |
static void |
SetHeadlessScreenResolution(int resolution)
Changes the screen resolution used in headless mode as a replacement of Toolkit.getDefaultToolkit().getScreenResolution()
by classes and methods that need to compute dimensions on the screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void BoundingBox(IlvRect bbox,
float[] x,
float[] y,
int count)
public static void BoundingBox(IlvRect bbox,
IlvPoint[] points,
int count)
public static Frame GetFrame(Component c)
public static float GetDeltaLine()
PointInLine to detect if a point is on a line.
The default value is 3.0.
public static void SetDeltaLine(float val)
PointInLine(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvPoint) to detect if a point is on a line.
val - The new value of the margin.public static int GetHeadlessScreenResolution()
Toolkit.getDefaultToolkit().getScreenResolution()
by classes and methods that need to compute dimensions on the screen.
The default value is 96.
GetHeadlessScreenResolution()public static void SetHeadlessScreenResolution(int resolution)
Toolkit.getDefaultToolkit().getScreenResolution()
by classes and methods that need to compute dimensions on the screen.
The default value is 96.
resolution - The new resolution.SetHeadlessScreenResolution(int)
public static boolean PointInLine(IlvPoint point,
IlvPoint from,
IlvPoint to)
true if the first specified point is on the line
described by the two other points. The default size of the margin
used is 8.0. To modify the margin, use SetDeltaLine(float).
point - The point to test.from - The first point of the line.to - The second point of the line.GetDeltaLine(),
SetDeltaLine(float)
public static boolean PointInLine(IlvPoint point,
IlvPoint from,
IlvPoint to,
boolean noMarginAtExtremities)
true if the first specified point is on the line described by the
two other points. The default size of the margin used is 8.0.
point - The point to test.from - The first point of the line.to - The second point of the line.noMarginAtExtremities - if true, the margin will not be used at the extremities of the line.GetDeltaLine(),
SetDeltaLine(float)
public static IlvPoint GetLineIntersection(IlvPoint p1LA,
IlvPoint p2LA,
IlvPoint p1LB,
IlvPoint p2LB,
IlvPoint result)
p1LA - One point on the first line.p2LA - Another point on the first line.p1LB - One point on the second line.p2LB - Another point on the second line.result - If not null, this point is used a container
for the return value and is filled with the intersection
point if the lines intersect.
If null, a new point is allocated internally
and returned, if the lines intersect.
null if the two
lines are parallel.
public static IlvPoint GetLineIntersection(double ax1,
double ay1,
double ax2,
double ay2,
double bx1,
double by1,
double bx2,
double by2,
IlvPoint result)
ax1 - The x coordinate of the first point on the first line.ay1 - The y coordinate of the first point on the first line.ax2 - The x coordinate of the second point on the first line.ay2 - The y coordinate of the second point on the first line.bx1 - The x coordinate of the first point on the second line.by1 - The y coordinate of the first point on the second line.bx2 - The x coordinate of the second point on the second line.by2 - The y coordinate of the second point on the second line.result - If not null, this point is used a container
for the return value and is filled with the intersection
point if the lines intersect.
If null, a new point is allocated internally
and returned, if the lines intersect.
null if the two
lines are parallel.public static Cursor CursorFromDirection(int direction)
public static double degreesToRadians(double angle)
angle parameter from degrees
into radians.
This method is identical to java.lang.Math.toRadians(angle).
public static double radiansToDegrees(double angle)
angle parameter from radians
into degrees.
This method is identical to java.lang.Math.toDegrees(angle).
public static Image GetImageFromFile(Class baseClass,
String file)
throws IOException
IlvImageUtil.getImageFromFile(java.lang.Class, java.lang.String) instead.
getResourceAsStream called on the baseClass object.
baseClass - The Class object on which the method
getResourceAsStream is called.file - The location of the file that contains the image to be read. The
location must be specified relative to the location of the baseClass
class.
IOExceptionpublic static final void registerKey(String key)
IlvProductUtil.registerApplication(java.lang.String)
instead.
public static final int GetVersion()
IlvFrameworkProduct.getVersion() instead.
public static final int GetMinorVersion()
IlvFrameworkProduct.getMinorVersion() instead.
public static final int GetSubMinorVersion()
IlvFrameworkProduct.getSubMinorVersion() instead.
public static final int GetPatchLevel()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||