|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.parser2d.DeltaXRelation
public class DeltaXRelation
Calculate the euclidean distance between given sites on pairs of input rectangles.
Field Summary | |
---|---|
static String |
NAME
The name that this relation goes by in text form. |
Constructor Summary | |
---|---|
DeltaXRelation(int site1,
int site2)
Calculate the delta X between the given sites on two input elements (e1.x - e2.x). |
Method Summary | |
---|---|
double |
apply(SceneElement e1,
SceneElement e2)
Return the distance between the constructor-specified sites on r1 and r2, respectively. |
static void |
debug(String s)
Debugging output. |
String |
getName()
The name of this relation. |
int |
getSite1()
Get the site for the first rectangle. |
int |
getSite2()
Get the site for the second rectangle. |
void |
setSite1(int site1)
Set the site for the first rectangle. |
void |
setSite2(int site2)
Set the site for the second rectangle. |
String |
toString()
Print out the contents of this relation. |
String |
toString(String e1Name,
String e2Name)
Pretty print the relation in the grammar format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static String NAME
Constructor Detail |
---|
public DeltaXRelation(int site1, int site2)
Method Detail |
---|
public double apply(SceneElement e1, SceneElement e2)
apply
in interface Relation
public static void debug(String s)
public String getName()
getName
in interface Relation
public int getSite1()
public int getSite2()
public void setSite1(int site1)
public void setSite2(int site2)
public String toString(String e1Name, String e2Name)
toString
in interface Relation
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |