public class NodeInst extends Geometric implements Nodable, java.lang.Comparable<NodeInst>
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.
Modifier and Type | Class and Description |
---|---|
static class |
NodeInst.ExpansionState
Class to gather expansion state for passing into a Job.
|
Modifier and Type | Field and Description |
---|---|
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 Variable holding outline information.
|
static Variable.Key |
TRANSISTOR_LENGTH_KEY
key of Variable holding serpentine transistor length.
|
Modifier and Type | Method and Description |
---|---|
void |
addDisplayableVariables(java.awt.geom.Rectangle2D rect,
java.util.List<Poly> polys,
EditWindow0 wnd,
boolean multipleStrings,
boolean showTempNames)
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.
|
void |
checkChanging()
Routing to check whether changing of this cell allowed or not.
|
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.
|
boolean |
checkReplacement(BatchChanges.NodeReplacement replacement,
EditingPreferences ep,
boolean ignorePortNames,
boolean allowMissingPorts)
Method to construct an object that represents a task to replace this NodeInst with one of another type.
|
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 |
copyVarsFrom(NodeInst other)
Method to copy all variables 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.
|
NodeInst |
doReplace(BatchChanges.NodeReplacement replacement,
EditingPreferences ep,
boolean allowMissingPorts,
boolean preserveParameters)
Method to really replace this NodeInst with one of another type.
|
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 |
findPortInstFromEquivalentProto(PortProto pp)
Method to return the Portinst on this NodeInst with a given prototype.
|
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.
|
ERectangle |
getBounds()
Method to return the bounds of this NodeInst.
|
CellBackup |
getCellBackup()
Returns CellBackup containing this NodeInst.
|
CellTree |
getCellTree()
Returns CellTree 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.
|
EDatabase |
getDatabase()
Returns database to which this NodeInst belongs.
|
java.util.Iterator<Variable> |
getDefinedParameters()
Method to return an Iterator over defined Parameters on this Nodable.
|
Poly[] |
getDisplayableVariables(EditWindow0 wnd,
boolean showTempNames)
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.
|
Nodable |
getNodable(int arrayIndex)
Get Nodable by array index.
|
int |
getNodableArrayIndex()
Get array index of this Nodable
For NodeInst, return 0
|
Nodable[] |
getNodables()
Get array of Nodables.
|
int |
getNodeId()
Method to get the id of this NodeInst.
|
int |
getNodeIndex()
Deprecated.
|
NodeInst |
getNodeInst()
Get the NodeInst associated with this Nodable
For NodeInsts, returns this.
|
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 |
getNumNodables()
Get number of Nodables.
|
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-dependent 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 |
getShapeOfPortForWiringTool(PortProto thePort,
java.awt.geom.Point2D selectPt,
EditingPreferences ep,
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.
|
Topology |
getTopology()
Method to return the Cell Topology that contains this NodeInst.
|
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 prototype is not relevant for some tool calculation and therefore
could be skip.
|
boolean |
isUsernamed()
Returns 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.
|
java.lang.String |
libDescribe()
Method to describe this NodeInst as a string.
|
void |
lowLevelModify(ImmutableNodeInst d)
Method to adjust this NodeInst by the specified deltas.
|
static NodeInst |
lowLevelNewInstance(Topology topology,
ImmutableNodeInst d) |
static NodeInst |
makeDummyInstance(NodeProto np,
EditingPreferences ep)
Method to create a "dummy" NodeInst for use outside of the database.
|
static NodeInst |
makeDummyInstance(NodeProto np,
EditingPreferences ep,
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,
EditingPreferences ep,
int techBits,
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,
ImmutableNodeInst d)
Method to create a "dummy" NodeInst for use outside of the database.
|
static NodeInst |
makeInstance(NodeProto protoType,
EditingPreferences ep,
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,
EditingPreferences ep,
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,
EditingPreferences ep,
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,
EditingPreferences ep,
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.
|
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
static NodeInst |
makeInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name,
int techBits)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
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)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
static NodeInst |
makeInstanceFromPoly(PrimitiveNode np,
PolyBase poly,
EditingPreferences ep,
Cell parent)
Method to create a node from a Poly instance
|
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,
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,
EditingPreferences ep,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent)
Short form method to create a NodeInst.
|
static NodeInst |
newInstance(NodeProto protoType,
EditingPreferences ep,
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,
EditingPreferences ep,
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.
|
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
static NodeInst |
newInstance(NodeProto protoType,
java.awt.geom.Point2D center,
double width,
double height,
Cell parent,
Orientation orient,
java.lang.String name,
int techBits)
Deprecated.
Use method with explicit EditingPreferences parameter.
|
java.lang.String |
noLibDescribe()
Method to describe this NodeInst as a string.
|
boolean |
pinUseCount()
Method to determine whether the display of this pin NodeInst should be suppressed.
|
FixpTransform |
pureRotateIn()
Method to return a transformation that unrotates the same as this NodeInst.
|
FixpTransform |
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,
EditingPreferences ep,
boolean ignorePortNames,
boolean allowMissingPorts,
boolean preserveParameters)
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.
|
FixpTransform |
rotateIn()
Method to return a transformation that unrotates this NodeInst.
|
FixpTransform |
rotateIn(FixpTransform prevTransform)
Method to return a transformation that unrotates this NodeInst,
combined with a previous transformation.
|
FixpTransform |
rotateOut()
Method to return a transformation that rotates this NodeInst.
|
FixpTransform |
rotateOut(FixpTransform prevTransform)
Method to return a transformation that rotates this NodeInst,
combined with a previous transformation.
|
FixpTransform |
rotateOutAboutTrueCenter()
Method to return a transformation that rotates this NodeInst.
|
FixpTransform |
rotateOutAboutTrueCenter(FixpTransform prevTransform)
Method to return a transformation that rotates this NodeInst,
combined with a previous transformation.
|
void |
setArcDegrees(double start,
double curvature,
EditingPreferences ep)
Method to set the starting and ending angle of an arc described by this NodeInst.
|
boolean |
setD(ImmutableNodeInst newD,
boolean notify)
Modifies persistent data of this NodeInst.
|
void |
setDInUndo(ImmutableNodeInst newD) |
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 |
setPrimitiveFunction(PrimitiveNode.Function function)
Method to set the pure "PrimitiveNode Function" for a primitive NodeInst in this Technology.
|
void |
setPrimitiveNodeSize(double width,
double length,
EditingPreferences ep)
Method to set the size of this transistor or resistor NodeInst.
|
void |
setPrimitiveNodeSize(java.lang.Object width,
java.lang.Object length,
EditingPreferences ep)
Method to set the size of a transistor or resistor NodeInst in this technology.
|
void |
setSerpentineTransistorLength(double length,
EditingPreferences ep)
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(EPoint[] points)
Method to set the "outline" information on this NodeInst.
|
void |
setTrace(java.awt.geom.Point2D[] points)
Method to set the "outline" information on this NodeInst.
|
void |
setTraceRelative(EPoint[] points,
EPoint anchor,
Orientation orient)
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.
|
FixpTransform |
transformIn()
Method to return a transformation that moves down the hierarchy.
|
FixpTransform |
transformIn(FixpTransform prevTransform)
Method to return a transformation that moves down the hierarchy.
|
FixpTransform |
transformOut()
Method to return a transformation that moves up the hierarchy.
|
FixpTransform |
transformOut(FixpTransform prevTransform)
Method to return a transformation that moves up the
hierarchy, combined with a previous transformation.
|
FixpTransform |
translateIn()
Method to return a transformation that translates down the hierarchy.
|
FixpTransform |
translateIn(FixpTransform prevTransform)
Method to return a transformation that translates down the
hierarchy, combined with a previous transformation.
|
FixpTransform |
translateOut()
Method to return a transformation that translates up the hierarchy.
|
FixpTransform |
translateOut(FixpTransform 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,
EditingPreferences ep)
Method to update a Parameter on this NodeInst with the specified values.
|
void |
updatePortInsts(boolean full)
Updates PortInsts of this NodeInst according to PortProtos in prototype.
|
void |
updatePortInsts(int[] pattern)
Update PortInsts of this NodeInst according to pattern.
|
Cell |
whichCell()
Method to determine the appropriate Cell associated with this ElectricObject.
|
protected java.lang.Object |
writeReplace() |
getInfo, getParent, getTrueCenter, getTrueCenterX, getTrueCenterY, whichMultiPage
addPolyList, checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, getArtwork, getCode, getDisplayableVariables, getFullDescription, getGeneric, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getParameterOrVariable, getParametersAndVariables, getReadableName, getSchematics, getTechPool, getTextBounds, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, isParam, newDisplayVar, newDisplayVar, newVar, newVar, newVar, newVar, newVar, renameVar, renameVar, setOff, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParameterOrVariable, getParent, getVar
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
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, EditingPreferences ep, java.awt.geom.Point2D center, double width, double height, Cell parent)
protoType
- the NodeProto of which this is an instance.ep
- EditingPreferences with default sizes and text descriptors.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 NodeInstpublic static NodeInst makeInstance(NodeProto protoType, EditingPreferences ep, 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.ep
- EditingPreferences with default sizes and text descriptors.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 NodeInstpublic 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 NodeInstpublic static NodeInst makeInstance(NodeProto protoType, EditingPreferences ep, 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.ep
- EditingPreferences with default sizes and text descriptors.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 NodeInstpublic 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 technologiespublic static NodeInst makeInstance(NodeProto protoType, EditingPreferences ep, 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.ep
- EditingPreferences with default sizes and text descriptors.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 technologiespublic static NodeInst makeInstanceFromPoly(PrimitiveNode np, PolyBase poly, EditingPreferences ep, Cell parent)
np
- the NodeProto of which this is an instance.poly
- the Poly object containing the pointsep
- EditingPreferences with default sizes and text descriptors.parent
- the Cell in which this NodeInst will reside.public static NodeInst makeDummyInstance(NodeProto np, EditingPreferences ep)
np
- the prototype of the NodeInst.ep
- EditingPreferences with default sizes and text descriptors.public static NodeInst makeDummyInstance(NodeProto np, EditingPreferences ep, EPoint center, double width, double height, Orientation orient)
np
- the prototype of the NodeInst.ep
- EditingPreferences with default sizes and text descriptors.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, EditingPreferences ep, int techBits, EPoint center, double width, double height, Orientation orient)
np
- the prototype of the NodeInst.ep
- EditingPreferences with default sizes and text descriptors.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 makeDummyInstance(NodeProto np, ImmutableNodeInst d)
np
- the prototype of the NodeInst.d
- contents of NodeInstjava.lang.IllegalArgumentException
- if np doesn't mathc d.protoIdpublic 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).parent
- the Cell in which this NodeInst will reside.public static NodeInst newInstance(NodeProto protoType, EditingPreferences ep, java.awt.geom.Point2D center, double width, double height, Cell parent)
protoType
- the NodeProto of which this is an instance.ep
- EditingPreferences with default sizes and text descriptors.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 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 orientation of this NodeInst.name
- name of new NodeInstpublic static NodeInst newInstance(NodeProto protoType, EditingPreferences ep, 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.ep
- EditingPreferences with default sizes and text descriptors.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 NodeInstpublic 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 orientation of this NodeInst.name
- name of new NodeInsttechBits
- bits associated to different technologiespublic static NodeInst newInstance(NodeProto protoType, EditingPreferences ep, 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.ep
- EditingPreferences with default sizes and text descriptors.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 technologiespublic 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 lowLevelNewInstance(Topology topology, 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, EditingPreferences ep, boolean ignorePortNames, boolean allowMissingPorts, boolean preserveParameters)
np
- the new type to put in place of this NodeInst.ep
- EditingPreferences with default sizes and text descriptors.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.preserveParameters
- true to keep parameters on the old node and put them on the new one.public boolean checkReplacement(BatchChanges.NodeReplacement replacement, EditingPreferences ep, boolean ignorePortNames, boolean allowMissingPorts)
replacement
- replacement taskep
- EditingPreferences with default sizes and text descriptors.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 NodeInst doReplace(BatchChanges.NodeReplacement replacement, EditingPreferences ep, boolean allowMissingPorts, boolean preserveParameters)
replacement
- the Replacement task.ep
- EditingPreferences with default sizes and text descriptors.allowMissingPorts
- true to allow replacement to have missing ports and, therefore, delete the arcs that used to be there.preserveParameters
- true to keep parameters on the old node and put them on the new one.IllegalArgument
- if replacement is impossiblepublic 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 copyVarsFrom(NodeInst other)
other
- the other NodeInst from which to copy Variables.public void lowLevelModify(ImmutableNodeInst d)
d
- the new persistent data of this NodeInst.public boolean isIconOfParent()
@Deprecated public final int getNodeIndex()
public final int getNodeId()
public boolean isLinked()
isLinked
in class ElectricObject
public Topology getTopology()
getTopology
in class Geometric
public void checkChanging()
checkChanging
in class ElectricObject
public Cell whichCell()
whichCell
in class ElectricObject
public EDatabase getDatabase()
getDatabase
in class ElectricObject
public CellTree getCellTree()
public CellBackup getCellBackup()
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)
public Poly getBaseShape()
public Poly getBaseShape(EPoint anchor, double baseWidth, double baseHeight)
baseWidth
- modified base width in lambda unitsbaseHeight
- modified base height in lambda unitspublic ERectangle getBounds()
public void redoGeometric()
public double[] getArcDegrees()
public void setArcDegrees(double start, double curvature, EditingPreferences ep)
start
- the starting offset of the angle, in radians (typically 0).curvature
- the the amount of curvature, in radians.ep
- EditingPreferences with default TextDescriptorspublic java.awt.geom.Rectangle2D getUntransformedBounds()
public Variable getParameter(Variable.Key key)
getParameter
in interface Nodable
key
- the key of the Parameterpublic boolean isDefinedParameter(Variable.Key key)
isDefinedParameter
in interface Nodable
key
- the key of the parameterpublic 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, EditingPreferences ep)
key
- the key of the Variable.value
- the object to store in the Variable.ep
- EditingPreferences with default TextDescriptorspublic void addDisplayableVariables(java.awt.geom.Rectangle2D rect, java.util.List<Poly> polys, EditWindow0 wnd, boolean multipleStrings, boolean showTempNames)
addDisplayableVariables
in class ElectricObject
rect
- a rectangle describing the bounds of the NodeInst on which the Variables will be displayed.polys
- a list of Poly objects that will be filled with the displayable Variables.wnd
- window in which the Variables will be displayed.multipleStrings
- true to break multi-line text into multiple Polys.showTempNames
- show temporary names on nodes and arcspublic Poly[] getDisplayableVariables(EditWindow0 wnd, boolean showTempNames)
wnd
- window in which the Variables will be displayed.showTempNames
- show temporary names on nodes and arcs.public FixpTransform transformOut()
public FixpTransform transformOut(FixpTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.public FixpTransform transformIn()
public FixpTransform transformIn(FixpTransform prevTransform)
prevTransform
- public FixpTransform translateIn()
public FixpTransform translateIn(FixpTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.public FixpTransform translateOut()
public FixpTransform translateOut(FixpTransform prevTransform)
prevTransform
- the previous transformation to the NodeInst's Cell.public FixpTransform pureRotateOut()
public FixpTransform pureRotateIn()
public FixpTransform rotateIn()
public FixpTransform rotateIn(FixpTransform prevTransform)
prevTransform
- the previous transformation to be applied.public FixpTransform rotateOut()
public FixpTransform rotateOutAboutTrueCenter()
public FixpTransform rotateOut(FixpTransform prevTransform)
prevTransform
- the previous transformation to be applied.public FixpTransform rotateOutAboutTrueCenter(FixpTransform prevTransform)
prevTransform
- the previous transformation to be applied.public Poly getShapeOfPort(PortProto thePort)
thePort
- the port on this NodeInst.public Poly getShapeOfPortForWiringTool(PortProto thePort, java.awt.geom.Point2D selectPt, EditingPreferences ep, 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.ep
- EditingPreferences with default sizesarcWidth
- 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 void setTrace(EPoint[] 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 void setTraceRelative(EPoint[] points, EPoint anchor, Orientation orient)
points
- an array of Point2D values in database coordinates.
These are relative to the center of the node and may be rotated.orient
- ratation of pointspublic 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.java.lang.IllegalArgumentException
- if PortProto doesn't belong to node's protopublic PortInst findPortInstFromEquivalentProto(PortProto pp)
pp
- the PortProto to find.java.lang.IllegalArgumentException
- if PortProto is not linkedpublic void updatePortInsts(int[] pattern)
pattern
- array with elements describing new PortInsts.public void updatePortInsts(boolean full)
public Cell getProtoEquivalent()
public boolean hasExports()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic java.util.Iterator<Export> getExports()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic int getNumExports()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic boolean pinUseCount()
public boolean isInlinePin()
public PortProto connectsTo(ArcProto arc)
arc
- the type of arc to test for.public java.util.Iterator<Connection> getConnections()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic boolean hasConnections()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic int getNumConnections()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic boolean isConnected(Geometric geom)
isConnected
in class Geometric
geom
- other Geometric object.public java.lang.String getName()
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 messagepublic 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)
public java.lang.String libDescribe()
public java.lang.String noLibDescribe()
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()
public boolean isCellInstance()
isCellInstance
in interface Nodable
public Nodable[] getNodables()
public int getNumNodables()
public Nodable getNodable(int arrayIndex)
arrayIndex
- the index of the desired Nodable.public boolean contains(NodeInst ni, int arrayIndex)
public NodeInst getNodeInst()
getNodeInst
in interface Nodable
public int getNodableArrayIndex()
getNodableArrayIndex
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, EditingPreferences ep)
width
- the new width of the transistorlength
- the new length of the transistorep
- EditingPreferences with default TextDescriptorspublic void setPrimitiveNodeSize(java.lang.Object width, java.lang.Object length, EditingPreferences ep)
width
- the new widthlength
- the new lengthep
- EditingPreferences with default TextDescriptorspublic double getSerpentineTransistorLength()
public void setSerpentineTransistorLength(double length, EditingPreferences ep)
length
- the new length of the transistor.ep
- EditingPreferences with default text descriptorspublic 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 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 void setPrimitiveFunction(PrimitiveNode.Function function)
function
- the PrimitiveNode.Function to set on the 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