|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.tools.Draw2dTools
public class Draw2dTools
Utilities for Draw2d.
| Constructor Summary | |
|---|---|
Draw2dTools()
|
|
| Method Summary | |
|---|---|
static EnumSet<Position> |
comparePosition(org.eclipse.draw2d.IFigure figure1,
org.eclipse.draw2d.IFigure figure2)
Compares position of figure2 to figure1. |
static double |
computeDistance(org.eclipse.draw2d.IFigure figure1,
org.eclipse.draw2d.IFigure figure2,
Position side)
Computes distance of sides of figures. |
static double |
computeDistance(org.eclipse.draw2d.IFigure figure,
org.eclipse.draw2d.geometry.Point p)
Computes distance of figure from point p. |
static int |
computeXDistance(org.eclipse.draw2d.IFigure figure,
int xCoordinate)
Computes horizontal distance of figure from xCoordinate vertical. |
static int |
computeYDistance(org.eclipse.draw2d.IFigure figure,
int yCoordinate)
Computes vertical distance of figure from yCoordinate horizont. |
static boolean |
contains(org.eclipse.draw2d.geometry.Rectangle rect,
int x,
int y)
Tests whether point falls into or on bounds of rectangle. |
static boolean |
contains(org.eclipse.draw2d.geometry.Rectangle rect,
org.eclipse.draw2d.geometry.Point p)
Tests whether point falls into or on bounds of rectangle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Draw2dTools()
| Method Detail |
|---|
public static boolean contains(org.eclipse.draw2d.geometry.Rectangle rect,
int x,
int y)
rect - tested rectanglex - X valuey - Y value
public static boolean contains(org.eclipse.draw2d.geometry.Rectangle rect,
org.eclipse.draw2d.geometry.Point p)
rect - tested rectanglex - X valuey - Y value
public static double computeDistance(org.eclipse.draw2d.IFigure figure,
org.eclipse.draw2d.geometry.Point p)
figure - to compute distance from pp - point
public static int computeYDistance(org.eclipse.draw2d.IFigure figure,
int yCoordinate)
figure - to compute distance from yCoordinateyCoordinate - y coordinate of horizontal line
public static int computeXDistance(org.eclipse.draw2d.IFigure figure,
int xCoordinate)
figure - to compute distance from xCoordinatexCoordinate - x coordinate of vertical line
public static double computeDistance(org.eclipse.draw2d.IFigure figure1,
org.eclipse.draw2d.IFigure figure2,
Position side)
figure1 - argument for distance computationfigure2 - argument for distance computationsides - of figures to compute distance, one of
Position#LEFT, Position#RIGHT,
Position#BOTTOM, Position#TOP
public static EnumSet<Position> comparePosition(org.eclipse.draw2d.IFigure figure1,
org.eclipse.draw2d.IFigure figure2)
Position#CONTAINS and
Position#CONTAINED.
figure1 - to compare withfigure2 - figure to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||