com.ebmwebsourcing.geasytools.geasyui.impl.core
Class Util

java.lang.Object
  extended by com.ebmwebsourcing.geasytools.geasyui.impl.core.Util

public class Util
extends java.lang.Object


Nested Class Summary
 class Util.LinearFunction
           
 
Method Summary
 Point getClosestIntersectionPointForRectangle(Point p1, Point p2, int rx, int ry, int rwidth, int rheight)
           
 Point getClosestPoint(Point p1, java.util.ArrayList<Point> points, Region r)
           
 Direction getDirection(Point p1, Point p2)
          Get p2 position relatively to p1
 double getDistance(double x1, double y1, double x2, double y2)
           
static Util getInstance()
           
 Point getIntesectionPointFromLinearFn(Util.LinearFunction fn1, Util.LinearFunction fn2)
           
 Util.LinearFunction getLinearFunctionFrom2Points(Point point1, Point point2)
           
 Point getNWPointFromElements(java.util.ArrayList<? extends IUIElement> elements)
           
 Point getSEPointFromElements(java.util.ArrayList<? extends IUIElement> elements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Util getInstance()

getNWPointFromElements

public Point getNWPointFromElements(java.util.ArrayList<? extends IUIElement> elements)

getSEPointFromElements

public Point getSEPointFromElements(java.util.ArrayList<? extends IUIElement> elements)

getClosestIntersectionPointForRectangle

public Point getClosestIntersectionPointForRectangle(Point p1,
                                                     Point p2,
                                                     int rx,
                                                     int ry,
                                                     int rwidth,
                                                     int rheight)

getClosestPoint

public Point getClosestPoint(Point p1,
                             java.util.ArrayList<Point> points,
                             Region r)

getDirection

public Direction getDirection(Point p1,
                              Point p2)
Get p2 position relatively to p1

Parameters:
p1 -
p2 -
Returns:

getLinearFunctionFrom2Points

public Util.LinearFunction getLinearFunctionFrom2Points(Point point1,
                                                        Point point2)

getIntesectionPointFromLinearFn

public Point getIntesectionPointFromLinearFn(Util.LinearFunction fn1,
                                             Util.LinearFunction fn2)

getDistance

public double getDistance(double x1,
                          double y1,
                          double x2,
                          double y2)


Copyright © 2010-2011 Petals Link. All Rights Reserved.