|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.technology.EdgeH
public class EdgeH
An EdgeH is a scalable X 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 width times the multiplier, adds the adder.
For example, the center of the NodeInst simply has multiplier = 0 and adder = 0. The left edge of the NodeInst has multiplier = -0.5 and adder = 0. The point that is 2 left of the right edge has multiplier = 0.5 and adder = -2. The point that is 3 right of the center has multiplier = 0 and adder = 3.
Constructor Summary | |
---|---|
EdgeH(double multiplier,
double adder)
Constructs an EdgeH with the specified values. |
Method Summary | |
---|---|
EdgeH |
duplicate()
Returns a clone of this Object |
boolean |
equals(java.lang.Object other)
Compare to another EdgeH |
static EdgeH |
fromCenter(double amt)
Describes a position that is away from the center by a specified amount. |
static EdgeH |
fromLeft(double amt)
Describes a position that is in from the left by a specified amount. |
static EdgeH |
fromRight(double amt)
Describes a position that is in from the right by a specified amount. |
double |
getAdder()
Returns the adder. |
long |
getGridAdder()
Returns the adder in grid units. |
double |
getMultiplier()
Returns the multiplier. |
static EdgeH |
makeCenter()
Creates a position that describes the center of the NodeInst. |
static EdgeH |
makeLeftEdge()
Creates a position that describes the left edge of the NodeInst. |
static EdgeH |
makeRightEdge()
Creates a position that describes the right 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 EdgeH. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EdgeH(double multiplier, double adder)
EdgeH
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 EdgeH duplicate()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other EdgeH 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 EdgeH fromLeft(double amt)
amt
- the amount to inset from the left of a NodeInst.public static EdgeH fromRight(double amt)
amt
- the amount to inset from the right of a NodeInst.public static EdgeH fromCenter(double amt)
amt
- the amount to move away from the center of the NodeInst.public static EdgeH makeLeftEdge()
public static EdgeH makeRightEdge()
public static EdgeH 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 |