|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.technology.EdgeV
public class EdgeV
An EdgeV is a scalable Y coordinate that converts a NodeInst bounds to a location inside of that NodeInst. It consists of two numbers: a multiplier and an adder. The resulting location starts at the center of the NodeInst, adds the NodeInst height times the multiplier, adds the adder.
For example, the center of the NodeInst simply has multiplier = 0 and adder = 0. The bottom of the NodeInst has multiplier = -0.5 and adder = 0. The point that is 2 below the top has multiplier = 0.5 and adder = -2. The point that is 3 above the center has multiplier = 0 and adder = 3.
Constructor Summary | |
---|---|
EdgeV(double multiplier,
double adder)
Constructs an EdgeV with the specified values. |
Method Summary | |
---|---|
EdgeV |
duplicate()
Returns a clone of this Object |
boolean |
equals(java.lang.Object other)
Compare to another EdgeV |
static EdgeV |
fromBottom(double amt)
Describes a position that is in from the bottom by a specified amount. |
static EdgeV |
fromCenter(double amt)
Describes a position that is away from the center by a specified amount. |
static EdgeV |
fromTop(double amt)
Describes a position that is in from the top by a specified amount. |
double |
getAdder()
Returns the adder. |
long |
getGridAdder()
Returns the adder in grid units. |
double |
getMultiplier()
Returns the multiplier. |
static EdgeV |
makeBottomEdge()
Creates a position that describes the bottom edge of the NodeInst. |
static EdgeV |
makeCenter()
Creates a position that describes the center of the NodeInst. |
static EdgeV |
makeTopEdge()
Creates a position that describes the top edge of the NodeInst. |
boolean |
setAdder(double adder)
Sets the adder. |
void |
setMultiplier(double multiplier)
Sets the multiplier. |
java.lang.String |
toString()
Returns a printable version of this EdgeV. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EdgeV(double multiplier, double adder)
EdgeV
with the specified values.
multiplier
- is the multiplier to store in the EdgeV.adder
- is the adder to store in the EdgeV.Method Detail |
---|
public EdgeV duplicate()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other EdgeV to compare.
public double getMultiplier()
public void setMultiplier(double multiplier)
multiplier
- the new multiplier.public double getAdder()
public long getGridAdder()
public boolean setAdder(double adder)
adder
- the new adder.
public static EdgeV fromTop(double amt)
amt
- the amount to inset from the top of a NodeInst.public static EdgeV fromBottom(double amt)
amt
- the amount to inset from the bottom of a NodeInst.public static EdgeV fromCenter(double amt)
amt
- the amount to move away from the center of the NodeInst.public static EdgeV makeBottomEdge()
public static EdgeV makeTopEdge()
public static EdgeV makeCenter()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |