|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.variable.ElectricObject
com.sun.electric.database.topology.Geometric
com.sun.electric.database.topology.NodeInst
public class NodeInst
A NodeInst is an instance of a NodeProto (a PrimitiveNode or a Cell). A NodeInst points to its prototype and the Cell in which it has been instantiated. It also has a name, and contains a list of Connections and Exports.
The rotation and transposition of a NodeInst can be confusing, so it is illustrated here. Nodes are transposed when one of their scale factors is negative.
Field Summary | |
---|---|
static Variable.Key |
NODE_NAME
key of obsolete Variable holding instance name. |
static Variable.Key |
NODE_PROTO
key of text descriptor with prototype name. |
static Variable.Key |
TRACE
key of Varible holding outline information. |
static Variable.Key |
TRANSISTOR_LENGTH_KEY
key of Varible holding serpentine transistor length. |
Fields inherited from class com.sun.electric.database.topology.Geometric |
---|
parent |
Method Summary | |
---|---|
int |
addDisplayableVariables(java.awt.geom.Rectangle2D rect,
Poly[] polys,
int start,
EditWindow0 wnd,
boolean multipleStrings)
Method to add all displayable Variables on this NodeInst and its PortInsts to an array of Poly objects. |
void |
addParameter(Variable param)
Method to add a Parameter to this NodeInst. |
void |
addVar(Variable var)
Method to add a Variable on this NodeInst. |
void |
check()
Method to check invariants in this NodeInst. |
int |
checkAndRepair(boolean repair,
java.util.List<Geometric> list,
ErrorLogger errorLogger)
Method to check and repair data structure errors in this NodeInst. |
static boolean |
checkNameKey(Name name,
Cell parent)
Method to check the new name key of a NodeInst. |
void |
checkPossibleVariableEffects(Variable.Key key)
Method to handle special case side-effects of setting variables on this NodeInst. |
void |
clearExpanded()
Method to set this NodeInst to be unexpanded. |
void |
clearHardSelect()
Method to set this NodeInst to be easy-to-select. |
void |
clearLocked()
Method to set this NodeInst to be unlocked. |
void |
clearVisInside()
Method to set this NodeInst to be not visible-inside. |
boolean |
compare(java.lang.Object obj,
java.lang.StringBuffer buffer)
This function is to compare NodeInst elements. |
int |
compareTo(NodeInst that)
Compares NodeInsts by their Cells and names. |
PortProto |
connectsTo(ArcProto arc)
Method to tell whether this NodeInst can connect to a given ArcProto. |
boolean |
contains(NodeInst ni,
int arrayIndex)
Implements Nodable.contains(NodeInst ni). |
void |
copyStateBits(NodeInst ni)
Method to copy the various state bits from another NodeInst to this NodeInst. |
void |
delParameter(Variable.Key key)
Method to delete a defined Parameter from this NodeInst. |
void |
delVar(Variable.Key key)
Method to delete a Variable from this NodeInst. |
java.lang.String |
describe(boolean withQuotes)
Method to describe this NodeInst as a string. |
PortInst |
findClosestPortInst(java.awt.geom.Point2D w)
Method to return the PortInst on this NodeInst that is closest to a point. |
java.awt.geom.Rectangle2D |
findEssentialBounds()
Return the Essential Bounds of this NodeInst. |
PortInst |
findPortInst(java.lang.String name)
Method to return the named PortInst on this NodeInst. |
PortInst |
findPortInstFromProto(PortProto pp)
Method to return the Portinst on this NodeInst with a given prototype. |
EPoint |
getAnchorCenter()
Method to return the center point of this NodeInst object. |
double |
getAnchorCenterX()
Method to return the center X coordinate of this NodeInst. |
double |
getAnchorCenterY()
Method to return the center Y coordinate of this NodeInst. |
int |
getAngle()
Method to return the rotation angle of this NodeInst. |
double[] |
getArcDegrees()
Method to return the starting and ending angle of an arc described by this NodeInst. |
Name |
getBasename()
Returns the basename for autonaming. |
Poly |
getBaseShape()
Returns the polygon that describe the base highlight of this NodeInst. |
Poly |
getBaseShape(EPoint anchor,
double baseWidth,
double baseHeight)
Returns the polygon that describe the base highlight of this NodeInst with modified size. |
java.awt.geom.Rectangle2D |
getBounds()
Method to return the bounds of this NodeInst. |
CellBackup |
getCellBackupUnsafe()
Returns CellBackup containing this NodeInst. |
java.util.Iterator<Connection> |
getConnections()
Method to return an Iterator over all Connections on this NodeInst. |
ImmutableNodeInst |
getD()
Returns persistent data of this NodeInst. |
java.util.Iterator<Variable> |
getDefinedParameters()
Method to return an Iterator over defined Parameters on this Nodable. |
Poly[] |
getDisplayableVariables(EditWindow0 wnd)
Method to get all displayable Variables on this NodeInst and its PortInsts to an array of Poly objects. |
java.util.Iterator<Export> |
getExports()
Method to return an Iterator over all Exports on this NodeInst. |
PrimitiveNode.Function |
getFunction()
Method to return the function of this NodeProto. |
double |
getLambdaBaseXSize()
Method to return the base X size of this NodeInst in lambda units. |
double |
getLambdaBaseYSize()
Method to return the base Y size of this NodeInst in lambda units. |
java.lang.String |
getName()
Method to return the name of this NodeInst. |
Name |
getNameKey()
Method to return the name key of this NodeInst. |
int |
getNodeIndex()
Method to get the index of this NodeInst. |
NodeInst |
getNodeInst()
Get the NodeInst associated with this Nodable For NodeInsts, this returns itself. |
PrimitiveNodeSize |
getNodeInstSize(VarContext context)
Method to return the size of this NodeInst in terms of width and height/length depending on the type of primitive. |
int |
getNumConnections()
Method to return the number of Connections on this NodeInst. |
int |
getNumExports()
Method to return the number of Exports on this NodeInst. |
int |
getNumPortInsts()
Method to return the number of PortInsts on this NodeInst. |
PortInst |
getOnlyPortInst()
Method to return the only PortInst on this NodeInst. |
Orientation |
getOrient()
Method to return the Orientation of this NodeInst. |
Variable |
getParameter(Variable.Key key)
Method to return the Parameter on this NodeInst with the given key. |
java.util.Iterator<Variable> |
getParameters()
Method to return an Iterator over all Parameters on this NodeInst. |
PortInst |
getPortInst(int portIndex)
Method to return the PortInst at specified position. |
java.util.Iterator<PortInst> |
getPortInsts()
Method to return an Iterator for all PortInsts on this NodeInst. |
PrimitiveNodeSize |
getPrimitiveDependentNodeSize(VarContext context)
Method to return the size of this PrimitiveNode-dependend NodeInst like transistors and resistors. |
NodeProto |
getProto()
Method to return the prototype of this NodeInst. |
Cell |
getProtoEquivalent()
Method to get the Schematic Cell from a NodeInst icon |
double |
getSerpentineTransistorLength()
Method to return the length of this serpentine transistor. |
java.util.Iterator<Poly> |
getShape(Poly.Builder polyBuilder)
Returns the polygons that describe this NodeInst. |
Poly |
getShapeOfPort(PortProto thePort)
Method to return a Poly that describes the location of a port on this NodeInst. |
Poly |
getShapeOfPort(PortProto thePort,
java.awt.geom.Point2D selectPt,
boolean forWiringTool,
double arcWidth)
Method to return a Poly that describes the location of a port on this NodeInst. |
int |
getTechSpecific()
Method to return the Technology-specific value on this NodeInst. |
java.lang.String |
getTechSpecificAddition()
Method to return a string that describes any technology-specific additions to this NodeInst's prototype name. |
TextDescriptor |
getTextDescriptor(Variable.Key varKey)
Returns the TextDescriptor on this NodeInst selected by variable key. |
EPoint[] |
getTrace()
Method to return the "outline" information on this NodeInst. |
PortInst |
getTransistorAltGatePort()
Method to return the alternate gate PortInst for this transistor NodeInst. |
PortInst |
getTransistorBasePort()
Method to return the base port of this transistor. |
PortInst |
getTransistorBiasPort()
Method to return a gate PortInst for this transistor NodeInst. |
PortInst |
getTransistorCollectorPort()
Method to return the collector port of this transistor. |
PortInst |
getTransistorDrainPort()
Method to return a gate PortInst for this transistor NodeInst. |
PortInst |
getTransistorEmitterPort()
Method to return the emitter port of this transistor. |
PortInst |
getTransistorGatePort()
Method to return a gate PortInst for this transistor NodeInst. |
TransistorSize |
getTransistorSize(VarContext context)
Method to return the size of this transistor NodeInst. |
PortInst |
getTransistorSourcePort()
Method to return a gate PortInst for this transistor NodeInst. |
java.awt.geom.Rectangle2D |
getUntransformedBounds()
Method to return the bounds of this NodeInst before it is transformed. |
double |
getXSize()
Method to return the X size of this NodeInst. |
double |
getXSizeWithoutOffset()
Method similar to getXSize() to return the X size of this NodeInst without the offset. |
double |
getYSize()
Method to return the Y size of this NodeInst. |
double |
getYSizeWithoutOffset()
Method similar to getXSize() to return the X size of this NodeInst without the offset. |
boolean |
hasConnections()
Returns true of there are Connections on this NodeInst. |
boolean |
hasExports()
Returns true of there are Exports on this NodeInst. |
java.awt.geom.Point2D |
invisiblePinWithOffsetText(boolean repair)
Method to tell if this NodeInst is an invisible-pin with text that is offset away from the pin center. |
boolean |
isCellInstance()
Method to tell whether this NodeInst is a cell instance. |
boolean |
isConnected(Geometric geom)
Method to tell whether this NodeInst is connected directly to another Geometric object (that is, an arcinst connected to a nodeinst). |
boolean |
isDefinedParameter(Variable.Key key)
Method to tell if the Variable.Key is a defined parameters of this NodeInst. |
boolean |
isDeprecatedVariable(Variable.Key key)
Method to determine whether a variable key on NodeInst is deprecated. |
boolean |
isExpanded()
Method to tell whether this NodeInst is expanded. |
boolean |
isHardSelect()
Method to tell whether this NodeInst is hard-to-select. |
boolean |
isIconOfParent()
Method to tell whether this NodeInst is an icon of its parent. |
boolean |
isInlinePin()
Method to tell whether this NodeInst is a pin that is "inline". |
boolean |
isInvisiblePinWithText()
Method to determine whether this is an Invisible Pin with text. |
boolean |
isLinked()
Method tells if this NodeInst is linked to parent Cell. |
boolean |
isLocked()
Method to tell whether this NodeInst is locked. |
boolean |
isMirroredAboutXAxis()
Method to return whether NodeInst is mirrored about a horizontal line running through its center. |
boolean |
isMirroredAboutYAxis()
Method to return whether NodeInst is mirrored about a vertical line running through its center. |
boolean |
isPrimitiveTransistor()
Method to see if this NodeInst is a Primitive Transistor. |
boolean |
isPrimtiveSubstrateNode()
Method to return true if a PrimitiveNode is acting as implant. |
boolean |
isSerpentineTransistor()
Method to see if this NodeInst is a Serpentine Transistor. |
static boolean |
isSpecialNode(NodeInst ni)
Method to detect if np is not relevant for some tool calculation and therefore could be skip. |
boolean |
isUsernamed()
Retruns true if this NodeInst was named by user. |
boolean |
isVisInside()
Method to tell whether this NodeInst is visible-inside. |
boolean |
isWiped()
Method to tell whether this NodeInst is wiped. |
boolean |
isXMirrored()
Method to tell whether this NodeInst is mirrored in the X coordinate. |
boolean |
isYMirrored()
Method to tell whether this NodeInst is mirrored in the Y coordinate. |
void |
kill()
Method to delete this NodeInst. |
void |
lowLevelModify(ImmutableNodeInst d)
Method to adjust this NodeInst by the specified deltas. |
static NodeInst |
lowLevelNewInstance(Cell parent,
ImmutableNodeInst d)
|
static NodeInst |
makeDummyInstance(NodeProto np)
Method to create a "dummy" NodeInst for use outside of the database. |
static NodeInst |
makeDummyInstance(NodeProto np,
EPoint center,
double width,
double height,
Orientation orient)
Method to create a "dummy" NodeInst for use outside of the database. |
static NodeInst |
makeDummyInstance(NodeProto np,
int techBits,
EPoint center,
double width,
double height,
Orientation orient)
Method to create a "dummy" NodeInst for use outside of the database. |
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent)
Short form method to create a NodeInst and do extra things necessary for it. |
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name)
Short form method to create a NodeInst and do extra things necessary for it. |
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name,
int techBits)
Long form method to create a NodeInst and do extra things necessary for it. |
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name,
PrimitiveNode.Function function)
Short form method to create a NodeInst and do extra things necessary for it. |
void |
modifyInstance(double dX,
double dY,
double dXSize,
double dYSize,
Orientation dOrient)
Method to change this NodeInst. |
static void |
modifyInstances(NodeInst[] nis,
double[] dXs,
double[] dYs,
double[] dXSizes,
double[] dYSizes)
Method to change many NodeInsts. |
void |
move(double dX,
double dY)
Method to move this NodeInst. |
static NodeInst |
newInstance(Cell parent,
ImmutableNodeInst d)
Method to create a NodeInst by ImmutableNodeInst. |
static NodeInst |
newInstance(Cell parent,
NodeProto protoType,
java.lang.String name,
TextDescriptor nameDescriptor,
java.awt.geom.Point2D center,
EPoint size,
Orientation orient,
int flags,
int techBits,
TextDescriptor protoDescriptor,
ErrorLogger errorLogger)
Long form method to create a NodeInst. |
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent)
Short form method to create a NodeInst. |
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name)
Long form method to create a NodeInst. |
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name,
int techBits)
Long form method to create a NodeInst. |
int |
numDisplayableVariables(boolean multipleStrings)
Method to return the number of displayable Variables on this NodeInst and all of its PortInsts. |
boolean |
pinUseCount()
Method to determine whether the display of this pin NodeInst should be supressed. |
java.awt.geom.AffineTransform |
pureRotateIn()
Method to return a transformation that unrotates the same as this NodeInst. |
java.awt.geom.AffineTransform |
pureRotateOut()
Method to return a transformation that rotates the same as this NodeInst. |
void |
redoGeometric()
Method to recalculate the Geometric bounds for this NodeInst. |
NodeInst |
replace(NodeProto np,
boolean ignorePortNames,
boolean allowMissingPorts)
Method to replace this NodeInst with one of another type. |
void |
resize(double dXSize,
double dYSize)
Method to resize this NodeInst. |
void |
rotate(Orientation dOrient)
Method to rotate and/or mirror this NodeInst. |
java.awt.geom.AffineTransform |
rotateIn()
Method to return a transformation that unrotates this NodeInst. |
java.awt.geom.AffineTransform |
rotateIn(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that unrotates this NodeInst, combined with a previous transformation. |
java.awt.geom.AffineTransform |
rotateOut()
Method to return a transformation that rotates this NodeInst. |
java.awt.geom.AffineTransform |
rotateOut(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that rotates this NodeInst, combined with a previous transformation. |
java.awt.geom.AffineTransform |
rotateOutAboutTrueCenter()
Method to return a transformation that rotates this NodeInst. |
java.awt.geom.AffineTransform |
rotateOutAboutTrueCenter(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that rotates this NodeInst, combined with a previous transformation. |
void |
setArcDegrees(double start,
double curvature)
Method to set the starting and ending angle of an arc described by this NodeInst. |
boolean |
setD(ImmutableNodeInst newD,
boolean notify)
Modifies persistend data of this NodeInst. |
void |
setDInUndo(ImmutableNodeInst newD)
|
void |
setExpanded()
Method to set this NodeInst to be expanded. |
void |
setExpanded(boolean value)
Method to set this NodeInst to be expanded. |
void |
setHardSelect()
Method to set this NodeInst to be hard-to-select. |
void |
setLocked()
Method to set this NodeInst to be locked. |
boolean |
setName(java.lang.String name)
Method to rename this NodeInst. |
void |
setNodeIndex(int nodeIndex)
Method to set an index of this NodeInst in Cell nodes. |
void |
setPrimitiveNodeSize(double width,
double length)
Method to set the size of this transistor or resistor NodeInst. |
void |
setPrimitiveNodeSize(java.lang.Object width,
java.lang.Object length)
Method to set the size of a transistor or resistor NodeInst in this technology. |
void |
setSerpentineTransistorLength(double length)
Method to store a length value on this serpentine transistor. |
void |
setTechSpecific(int value)
Method to set a Technology-specific value on this NodeInst. |
void |
setTextDescriptor(Variable.Key varKey,
TextDescriptor td)
Updates the TextDescriptor on this NodeInst selected by varKey. |
void |
setTrace(java.awt.geom.Point2D[] points)
Method to set the "outline" information on this NodeInst. |
void |
setVisInside()
Method to set this NodeInst to be visible-inside. |
java.lang.String |
toString()
Returns a printable version of this NodeInst. |
boolean |
traceWraps()
Method to tell whether the outline information on this NodeInst wraps. |
java.awt.geom.AffineTransform |
transformIn()
Method to return a transformation that moves down the hierarchy. |
java.awt.geom.AffineTransform |
transformIn(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that moves down the hierarchy. |
java.awt.geom.AffineTransform |
transformOut()
Method to return a transformation that moves up the hierarchy. |
java.awt.geom.AffineTransform |
transformOut(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that moves up the hierarchy, combined with a previous transformation. |
java.awt.geom.AffineTransform |
translateIn()
Method to return a transformation that translates down the hierarchy. |
java.awt.geom.AffineTransform |
translateIn(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that translates down the hierarchy, combined with a previous transformation. |
java.awt.geom.AffineTransform |
translateOut()
Method to return a transformation that translates up the hierarchy. |
java.awt.geom.AffineTransform |
translateOut(java.awt.geom.AffineTransform prevTransform)
Method to return a transformation that translates up the hierarchy, combined with a previous transformation. |
Variable |
updateParam(Variable.Key key,
java.lang.Object value)
Method to update a Parameter on this NodeInst with the specified values. |
void |
updatePortInsts(boolean full)
Updaten PortInsts of this NodeInst according to PortProtos in prototype. |
void |
updatePortInsts(int[] pattern)
Update PortInsts of this NodeInst accoding to pattern. |
protected java.lang.Object |
writeReplace()
|
Methods inherited from class com.sun.electric.database.topology.Geometric |
---|
checkChanging, getDatabase, getGridBounds, getInfo, getLambdaBounds, getParent, getTrueCenter, getTrueCenterX, getTrueCenterY, whichCell, whichMultiPage |
Methods inherited from class com.sun.electric.database.variable.ElectricObject |
---|
checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, copyVarsFrom, getArtwork, getCode, getDisplayableVariables, getEditingPreferences, getGeneric, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getParameterOrVariable, getParametersAndVariables, getPolyList, getSchematics, getTech, getTechPool, getTextBounds, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, isParam, newDisplayVar, newVar, newVar, newVar, newVar, renameVar, renameVar, setOff, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.sun.electric.database.hierarchy.Nodable |
---|
getParameterOrVariable, getParent, getVar |
Field Detail |
---|
public static final Variable.Key NODE_PROTO
public static final Variable.Key NODE_NAME
public static final Variable.Key TRACE
public static final Variable.Key TRANSISTOR_LENGTH_KEY
Method Detail |
---|
public static boolean isSpecialNode(NodeInst ni)
ni
- the NodeInst in question.
protected java.lang.Object writeReplace()
public static NodeInst makeInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.
public static NodeInst makeInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent, Orientation orient, java.lang.String name)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.orient
- the orientation of this NodeInst.name
- name of new NodeInst
public static NodeInst makeInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent, Orientation orient, java.lang.String name, PrimitiveNode.Function function)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.orient
- the orientation of this NodeInst.name
- name of new NodeInst
public static NodeInst makeInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent, Orientation orient, java.lang.String name, int techBits)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.orient
- the orientation of this NodeInst.name
- name of new NodeInsttechBits
- bits associated to different technologies
public static NodeInst makeDummyInstance(NodeProto np)
np
- the prototype of the NodeInst.
public static NodeInst makeDummyInstance(NodeProto np, EPoint center, double width, double height, Orientation orient)
np
- the prototype of the NodeInst.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).orient
- the orientation of this NodeInst.
public static NodeInst makeDummyInstance(NodeProto np, int techBits, EPoint center, double width, double height, Orientation orient)
np
- the prototype of the NodeInst.techBits
- tech bits of the NodeInstcenter
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).orient
- the orientation of this NodeInst.
public static NodeInst newInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).
If negative, flip the Y coordinate (or flip ABOUT the X axis).parent
- the Cell in which this NodeInst will reside.
public static NodeInst newInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent, Orientation orient, java.lang.String name)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.orient
- the oriantation of this NodeInst.name
- name of new NodeInst
public static NodeInst newInstance(NodeProto protoType, java.awt.geom.Point2D center, double width, double height, Cell parent, Orientation orient, java.lang.String name, int techBits)
protoType
- the NodeProto of which this is an instance.center
- the center location of this NodeInst.width
- the width of this NodeInst (can't be negative).height
- the height of this NodeInst (can't be negative).parent
- the Cell in which this NodeInst will reside.orient
- the oriantation of this NodeInst.name
- name of new NodeInsttechBits
- bits associated to different technologies
public static NodeInst newInstance(Cell parent, NodeProto protoType, java.lang.String name, TextDescriptor nameDescriptor, java.awt.geom.Point2D center, EPoint size, Orientation orient, int flags, int techBits, TextDescriptor protoDescriptor, ErrorLogger errorLogger)
parent
- the Cell in which this NodeInst will reside.protoType
- the NodeProto of which this is an instance.name
- name of new NodeInstnameDescriptor
- TextDescriptor of name of this NodeInstcenter
- the center location of this NodeInst.size
- the size of this NodeInst (can't be negative).orient
- the orientation of this NodeInst.flags
- flags of this NodeInst.techBits
- bits associated to different technologiesprotoDescriptor
- TextDescriptor of name of this NodeInsterrorLogger
- error logger to report node rename.
public static NodeInst newInstance(Cell parent, ImmutableNodeInst d)
parent
- the Cell in which this NodeInst will reside.d
- ImmutableNodeInst of new NodeInst
public static NodeInst lowLevelNewInstance(Cell parent, ImmutableNodeInst d)
public void kill()
public void move(double dX, double dY)
dX
- the amount to move the NodeInst in X.dY
- the amount to move the NodeInst in Y.public void resize(double dXSize, double dYSize)
dXSize
- the amount to scale the NodeInst in X.dYSize
- the amount to scale the NodeInst in Y.public void rotate(Orientation dOrient)
dOrient
- the change in Orientation of the NodeInst.public void modifyInstance(double dX, double dY, double dXSize, double dYSize, Orientation dOrient)
dX
- the amount to move the NodeInst in X.dY
- the amount to move the NodeInst in Y.dXSize
- the amount to scale the NodeInst in X.dYSize
- the amount to scale the NodeInst in Y.dOrient
- the change of Orientation of the NodeInst.public static void modifyInstances(NodeInst[] nis, double[] dXs, double[] dYs, double[] dXSizes, double[] dYSizes)
nis
- the NodeInsts to change.dXs
- the amount to move the NodeInsts in X, or null.dYs
- the amount to move the NodeInsts in Y, or null.dXSizes
- the amount to scale the NodeInsts in X, or null.dYSizes
- the amount to scale the NodeInsts in Y, or null.public NodeInst replace(NodeProto np, boolean ignorePortNames, boolean allowMissingPorts)
np
- the new type to put in place of this NodeInst.ignorePortNames
- true to not use port names when determining association between old and new prototype.allowMissingPorts
- true to allow replacement to have missing ports and, therefore, delete the arcs that used to be there.
public ImmutableNodeInst getD()
getD
in class ElectricObject
public boolean setD(ImmutableNodeInst newD, boolean notify)
newD
- new persistent data.notify
- true to notify Undo system.
public void setDInUndo(ImmutableNodeInst newD)
public void addVar(Variable var)
addVar
in class ElectricObject
var
- Variable to add.public void delVar(Variable.Key key)
delVar
in class ElectricObject
key
- the key of the Variable to delete.public void lowLevelModify(ImmutableNodeInst d)
d
- the new persistent data of this NodeInst.public boolean isIconOfParent()
public void setNodeIndex(int nodeIndex)
nodeIndex
- an index of this NodeInst in Cell nodes.public final int getNodeIndex()
public boolean isLinked()
isLinked
in class ElectricObject
public CellBackup getCellBackupUnsafe()
public Orientation getOrient()
public int getAngle()
public EPoint getAnchorCenter()
public double getAnchorCenterX()
public double getAnchorCenterY()
public double getXSize()
public double getLambdaBaseXSize()
public double getXSizeWithoutOffset()
public double getYSize()
public double getLambdaBaseYSize()
public double getYSizeWithoutOffset()
public boolean isMirroredAboutXAxis()
public boolean isMirroredAboutYAxis()
public boolean isXMirrored()
public boolean isYMirrored()
public java.util.Iterator<Poly> getShape(Poly.Builder polyBuilder)
getShape
in class Geometric
polyBuilder
- Poly builder.
public Poly getBaseShape()
public Poly getBaseShape(EPoint anchor, double baseWidth, double baseHeight)
baseWidth
- modified base width in lambda unitsbaseHeight
- modified base height in lambda units
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface RTBounds
getBounds
in class Geometric
public void redoGeometric()
public double[] getArcDegrees()
public void setArcDegrees(double start, double curvature)
start
- the starting offset of the angle (typically 0)curvature
- the the amount of curvaturepublic java.awt.geom.Rectangle2D getUntransformedBounds()
public Variable getParameter(Variable.Key key)
getParameter
in interface Nodable
key
- the key of the Parameter
public boolean isDefinedParameter(Variable.Key key)
isDefinedParameter
in interface Nodable
key
- the key of the parameter
public java.util.Iterator<Variable> getParameters()
getParameters
in interface Nodable
public java.util.Iterator<Variable> getDefinedParameters()
getDefinedParameters
in interface Nodable
public void addParameter(Variable param)
param
- the Variable to add.public void delParameter(Variable.Key key)
key
- the key of the Variable to delete.public Variable updateParam(Variable.Key key, java.lang.Object value)
key
- the key of the Variable.value
- the object to store in the Variable.
public int numDisplayableVariables(boolean multipleStrings)
numDisplayableVariables
in class ElectricObject
public int addDisplayableVariables(java.awt.geom.Rectangle2D rect, Poly[] polys, int start, EditWindow0 wnd, boolean multipleStrings)
addDisplayableVariables
in class ElectricObject
rect
- a rectangle describing the bounds of the NodeInst on which the Variables will be displayed.polys
- an array of Poly objects that will be filled with the displayable Variables.start
- the starting index in the array of Poly objects to fill with displayable Variables.wnd
- window in which the Variables will be displayed.multipleStrings
- true to break multiline text into multiple Polys.
public Poly[] getDisplayableVariables(EditWindow0 wnd)
wnd
- window in which the Variables will be displayed.
public java.awt.geom.AffineTransform transformOut()
public java.awt.geom.AffineTransform transformOut(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.
public java.awt.geom.AffineTransform transformIn()
public java.awt.geom.AffineTransform transformIn(java.awt.geom.AffineTransform prevTransform)
prevTransform
-
public java.awt.geom.AffineTransform translateIn()
public java.awt.geom.AffineTransform translateIn(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.
public java.awt.geom.AffineTransform translateOut()
public java.awt.geom.AffineTransform translateOut(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.
public java.awt.geom.AffineTransform pureRotateOut()
public java.awt.geom.AffineTransform pureRotateIn()
public java.awt.geom.AffineTransform rotateIn()
public java.awt.geom.AffineTransform rotateIn(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to be applied.
public java.awt.geom.AffineTransform rotateOut()
public java.awt.geom.AffineTransform rotateOutAboutTrueCenter()
public java.awt.geom.AffineTransform rotateOut(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to be applied.
public java.awt.geom.AffineTransform rotateOutAboutTrueCenter(java.awt.geom.AffineTransform prevTransform)
prevTransform
- the previous transformation to be applied.
public Poly getShapeOfPort(PortProto thePort)
thePort
- the port on this NodeInst.
public Poly getShapeOfPort(PortProto thePort, java.awt.geom.Point2D selectPt, boolean forWiringTool, double arcWidth)
thePort
- the port on this NodeInst.selectPt
- if not null, it requests a new location on the port,
away from existing arcs, and close to this point.
This is useful for "area" ports such as the left side of AND and OR gates.forWiringTool
- this is an experimental flag that will reduce the *untransformed*
port width to zero if the primitive node's width is the default width. Likewise with
the port height. It will also take into account the arc width of the connecting arc
for contact cuts. These modifications are for the wiring tool.arcWidth
- of connecting arc, for the wiring tool if 'forWiringTool' is true.
set to -1 to ignore.
public EPoint[] getTrace()
public void setTrace(java.awt.geom.Point2D[] points)
points
- an array of Point2D values in database coordinates.
These are not relative to the center of the node, but are actual coordinates of the outline.public boolean traceWraps()
public java.util.Iterator<PortInst> getPortInsts()
public int getNumPortInsts()
public PortInst getPortInst(int portIndex)
portIndex
- specified position of PortInst.
public PortInst getOnlyPortInst()
public PortInst findPortInst(java.lang.String name)
name
- the name of the PortInst.
public PortInst findClosestPortInst(java.awt.geom.Point2D w)
w
- the point of interest.
public PortInst findPortInstFromProto(PortProto pp)
pp
- the PortProto to find.
public void updatePortInsts(int[] pattern)
pattern
- array with elements describing new PortInsts.public void updatePortInsts(boolean full)
public Cell getProtoEquivalent()
public boolean hasExports()
public java.util.Iterator<Export> getExports()
public int getNumExports()
public boolean pinUseCount()
public boolean isInlinePin()
public PortProto connectsTo(ArcProto arc)
arc
- the type of arc to test for.
public java.util.Iterator<Connection> getConnections()
public boolean hasConnections()
public int getNumConnections()
public boolean isConnected(Geometric geom)
isConnected
in class Geometric
geom
- other Geometric object.
public java.lang.String getName()
getName
in interface Nodable
public boolean isUsernamed()
public Name getNameKey()
getNameKey
in interface Nodable
public boolean setName(java.lang.String name)
name
- new name of this NodeInst.
public static boolean checkNameKey(Name name, Cell parent)
name
- new name key of this NodeInst.parent
- parent Cell used for error message
public TextDescriptor getTextDescriptor(Variable.Key varKey)
NodeInst.NODE_NAME
NodeInst.NODE_PROTO
The TextDescriptor gives information for displaying the Variable.
getTextDescriptor
in class ElectricObject
varKey
- key of variable or special key.
public void setTextDescriptor(Variable.Key varKey, TextDescriptor td)
setTextDescriptor
in class ElectricObject
varKey
- key of variable or special key.td
- new value TextDescriptorpublic boolean isDeprecatedVariable(Variable.Key key)
isDeprecatedVariable
in class ElectricObject
key
- the key of the variable.
public void checkPossibleVariableEffects(Variable.Key key)
key
- the Variable key that has changed on this NodeInst.public boolean isInvisiblePinWithText()
public java.awt.geom.Point2D invisiblePinWithOffsetText(boolean repair)
repair
- true to fix such text by changing its offset to (0,0).
If this is selected, the change is made directly (so this must be called from
inside of a job).
public java.lang.String getTechSpecificAddition()
public java.lang.String describe(boolean withQuotes)
describe
in class Geometric
withQuotes
- to wrap description between quotes
public int compareTo(NodeInst that)
compareTo
in interface java.lang.Comparable<NodeInst>
that
- the other NodeInst.
public java.lang.String toString()
toString
in interface Nodable
toString
in class ElectricObject
public NodeProto getProto()
getProto
in interface Nodable
public boolean isCellInstance()
isCellInstance
in interface Nodable
public boolean contains(NodeInst ni, int arrayIndex)
contains
in interface Nodable
ni
- a NodeInst
public NodeInst getNodeInst()
getNodeInst
in interface Nodable
public PrimitiveNode.Function getFunction()
public boolean isPrimitiveTransistor()
public boolean isPrimtiveSubstrateNode()
public boolean isSerpentineTransistor()
public PrimitiveNodeSize getNodeInstSize(VarContext context)
context
- the VarContext in which any evaluations take place,
pass in VarContext.globalContext if no context needed.
public PrimitiveNodeSize getPrimitiveDependentNodeSize(VarContext context)
context
- the VarContext in which any evaluations take place,
pass in VarContext.globalContext if no context needed.
public TransistorSize getTransistorSize(VarContext context)
context
- the VarContext in which any evaluations take place,
pass in VarContext.globalContext if no context needed.
public void setPrimitiveNodeSize(double width, double length)
width
- the new width of the transistorlength
- the new length of the transistorpublic void setPrimitiveNodeSize(java.lang.Object width, java.lang.Object length)
width
- the new widthlength
- the new lengthpublic double getSerpentineTransistorLength()
public void setSerpentineTransistorLength(double length)
length
- the new length of the transistor.public PortInst getTransistorGatePort()
public PortInst getTransistorAltGatePort()
public PortInst getTransistorSourcePort()
public PortInst getTransistorEmitterPort()
public PortInst getTransistorBasePort()
public PortInst getTransistorCollectorPort()
public PortInst getTransistorBiasPort()
public PortInst getTransistorDrainPort()
public int checkAndRepair(boolean repair, java.util.List<Geometric> list, ErrorLogger errorLogger)
public void check()
check
in class ElectricObject
java.lang.AssertionError
- if invariants are not validpublic Name getBasename()
public void copyStateBits(NodeInst ni)
ni
- the other NodeInst to copy.public void setExpanded(boolean value)
value
- true if NodeInst is expanded.public void setExpanded()
public void clearExpanded()
public boolean isExpanded()
public boolean isWiped()
public void setHardSelect()
public void clearHardSelect()
public boolean isHardSelect()
public void setVisInside()
public void clearVisInside()
public boolean isVisInside()
public void setLocked()
public void clearLocked()
public boolean isLocked()
public void setTechSpecific(int value)
value
- the Technology-specific value to store on this NodeInst.public int getTechSpecific()
public java.awt.geom.Rectangle2D findEssentialBounds()
If this is a NodeInst of a Cell, and if that Cell has Essential Bounds, then map that Cell's Essential Bounds into the coordinate space of the Cell that contains this NodeInst, and return the Rectangle2D that contains those bounds. Otherwise return null.
public boolean compare(java.lang.Object obj, java.lang.StringBuffer buffer)
obj
- Object to compare tobuffer
- To store comparison messages in case of failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |