|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.technology.PrimitiveNode
public class PrimitiveNode
A PrimitiveNode represents information about a NodeProto that lives in a Technology. It has a name, and several functions that describe how to draw it
Nested Class Summary | |
---|---|
static class |
PrimitiveNode.Function
Function is a typesafe enum class that describes the function of a NodeProto. |
class |
PrimitiveNode.NodeSizeRule
Class to define a single rule on a node. |
Field Summary | |
---|---|
static int |
HIGHVTBIT
set if node is a high vt transistor |
static int |
LOWVTBIT
set if node is a low vt transistor |
static int |
NATIVEBIT
set if node is a native transistor |
static int |
NORMAL
Defines a normal node. |
static int |
OD18BIT
set if node is a od18 transistor |
static int |
OD25BIT
set if node is a od25 transistor |
static int |
OD33BIT
set if node is a od33 transistor |
static int |
POLYGONAL
Defines a polygonal transistor. |
static int |
SERPTRANS
Defines a serpentine transistor. |
Constructor Summary | |
---|---|
protected |
PrimitiveNode(java.lang.String protoName,
Technology tech,
EPoint sizeCorrector1,
EPoint sizeCorrector2,
java.lang.String minSizeRule,
double defWidth,
double defHeight,
ERectangle fullRectangle,
ERectangle baseRectangle,
Technology.NodeLayer[] layers)
The constructor is never called externally. |
Method Summary | |
---|---|
void |
addPrimitivePorts(PrimitivePort[] ports)
Method to add an array of PrimitivePorts to this PrimitiveNode. |
boolean |
canShrink()
Method to tell if instances of this PrimitiveNode can shrink. |
void |
clearArcsShrink()
Method to set this PrimitiveNode so that arcs connected to instances will not shrink in nonmanhattan situations. |
void |
clearArcsWipe()
Method to set this PrimitiveNode so that instances of it are not "arc-wipable". |
void |
clearCanBeZeroSize()
Method to set this PrimitiveNode so that it cannot be zero in size. |
void |
clearCanShrink()
Method to prevent instances of this PrimitiveNode from shrinking. |
void |
clearEdgeSelect()
Method to set this PrimitiveNode so that instances of it are not selectable only by their edges. |
void |
clearHoldsOutline()
Method to set this PrimitiveNode so that instances of it may not hold outline information. |
void |
clearLockedPrim()
Method to set this PrimitiveNode so that instances of it are not locked. |
void |
clearSquare()
Method to set this PrimitiveNode so that instances of it are not "square". |
void |
clearWipeOn1or2()
Method to set this PrimitiveNode so that instances of it are not wiped when 1 or 2 arcs connect. |
int |
compareTo(PrimitiveNode that)
Compares PrimtiveNodes by their Technologies and definition order. |
PrimitivePort |
connectsTo(ArcProto arc)
Method to return the PrimitivePort on this PrimitiveNode that can connect to an arc of the specified type. |
java.lang.String |
describe(boolean withQuotes)
Method to describe this PrimitiveNode as a string. |
Technology.NodeLayer |
findMulticut()
Find a NodeLayer of this PrimitiveNode has NodeLayer with MULTICUTBOX representation. |
Technology.NodeLayer |
findNodeLayer(Layer layer,
boolean electrical)
Method to find the NodeLayer on this PrimitiveNode with a given Layer. |
PortProto |
findPortProto(Name name)
Method to find the PortProto that has a particular Name. |
PortProto |
findPortProto(java.lang.String name)
Method to find the PortProto that has a particular name. |
Dimension2D |
getAutoGrowth()
Method to get the auto-growth factor for this PrimitiveNode. |
ERectangle |
getBaseRectangle()
Method to get the base (highlight) ERectangle of this PrimitiveNode. |
long |
getDefaultGridBaseHeight()
Method to return the default base height of this PrimitiveNode in grid units. |
long |
getDefaultGridBaseWidth()
Method to return the default base width of this PrimitiveNode in grid units. |
long |
getDefaultGridExtendX()
Method to return the defaut extend of this PrimitiveNode over minimal width\ in grid units. |
long |
getDefaultGridExtendY()
Method to return the defaut extend of this PrimitiveNode over minimal height\ in grid units. |
double |
getDefaultLambdaBaseHeight()
Method to return the default base hwight of this PrimitiveNode in lambda units. |
double |
getDefaultLambdaBaseWidth()
Method to return the default base width of this PrimitiveNode in lambda units. |
double |
getDefaultLambdaExtendX()
Method to return the defaut extend of this PrimitiveNode over minimal width\ in lambda units. |
double |
getDefaultLambdaExtendY()
Method to return the defaut extend of this PrimitiveNode over minimal height\ in lambda units. |
double |
getDefHeight()
Method to return the default full height of this PrimitiveNode. |
int |
getDefPlacementAngle()
Abstract method to return the default rotation for new instances of this PrimitiveNode. |
double |
getDefWidth()
Method to return the default full width of this PrimitiveNode. |
Technology.NodeLayer[] |
getElectricalLayers()
Method to return the list of electrical Layers that comprise this PrimitiveNode. |
java.lang.String |
getFullName()
Method to return the full name of this PrimitiveNode. |
ERectangle |
getFullRectangle()
Method to get the full (true) ERectangle of this PrimitiveNode. |
PrimitiveNode.Function |
getFunction()
Method to return the function of this PrimitiveNode. |
PrimitiveNode.Function |
getGroupFunction()
Method to return the function of this PrimitiveNode, grouped according to its general function. |
PrimitiveNodeId |
getId()
Method to return NodeProtoId of this NodeProto. |
java.util.Iterator<Layer> |
getLayerIterator()
Method to return an iterator over the layers in this PrimitiveNode. |
Technology.NodeLayer[] |
getLayers()
Method to return the list of Layers that comprise this PrimitiveNode. |
PrimitiveNode.NodeSizeRule |
getMinSizeRule()
Method to return the minimum size rule for this PrimitiveNode. |
EPoint |
getMulticut2Size()
|
java.lang.String |
getName()
Method to return the name of this PrimitiveNode in the Technology. |
int |
getNumPorts()
Method to return the number of PortProtos on this NodeProto. |
PrimitivePort |
getPort(int portIndex)
Method to return the PortProto at specified position. |
PrimitivePort |
getPort(PortProtoId portProtoId)
Method to return the PortProto by thread-independent PortProtoId. |
java.util.Iterator<PortProto> |
getPorts()
Method to return an iterator over all PortProtos of this NodeProto. |
java.util.Iterator<PrimitivePort> |
getPrimitivePorts()
Method to return an iterator over all PrimitivePorts of this PrimitiveNode. |
int |
getPrimNodeIndexInTech()
Method to retrieve index of the node in the given technology |
SizeOffset |
getProtoSizeOffset()
Method to get the size offset of this PrimitiveNode. |
int |
getSpecialType()
Method to return the special type of this PrimitiveNode. |
static java.lang.String |
getSpecialTypeName(int t)
Method to return the name of a special PrimitiveNode type. |
double[] |
getSpecialValues()
Method to return the special values stored on this PrimitiveNode. |
java.lang.String |
getSpiceTemplate()
Method to get the Spice template on this PrimitiveNode. |
Technology |
getTechnology()
Method to return the Technology of this PrimitiveNode. |
void |
getZValues(double[] array)
Method to get MinZ and MaxZ of the cell calculated based on nodes |
boolean |
hasMultiCuts()
Tells whether this PrimitiveNode has NodeLayer with MULTICUTBOX representation. |
boolean |
isArcsShrink()
Method to tell if instances of this PrimitiveNode cause arcs to shrink in nonmanhattan situations. |
boolean |
isArcsWipe()
Method to tell if instances of this PrimitiveNode are "arc-wipable" by when created. |
boolean |
isCanBeZeroSize()
Method to tell if instances of this PrimitiveNode can be zero in size. |
boolean |
isEdgeSelect()
Method to tell if instances of this PrimitiveNode are selectable on their edges. |
boolean |
isHoldsOutline()
Method to tell if instances of this PrimitiveNode can hold an outline. |
boolean |
isLockedPrim()
Method to tell if instances of this PrimitiveNode are loced. |
boolean |
isMulticut()
Tells whether this PrimitiveNode is multicut, i.e. |
boolean |
isNodeBitOn(int bit)
Method to determine if node has a given bit on. |
boolean |
isNodeInvisible()
Method to tell if instances of this PrimitiveNode are invisible. |
boolean |
isNotUsed()
Method to tell if this PrimitiveNode is used. |
boolean |
isPin()
Method to tell whether this PrimitiveNode is a Pin. |
boolean |
isPureSubstrateNode()
Method to determine if PrimitiveNode represents substrate node |
boolean |
isPureWellNode()
Method to determine if PrimitiveNode represents a well node |
boolean |
isSkipSizeInPalette()
Method to tell if instaces of this PrimitiveNode are special (don't appear in menu). |
boolean |
isSquare()
Method to tell if instances of this PrimitiveNode are square. |
boolean |
isVisible()
Method to determine whether a primitive node is visible. |
boolean |
isWipeOn1or2()
Method to tell if instances of this PrimitiveNode are wiped when 1 or 2 arcs connect. |
static PrimitiveNode |
newInstance(java.lang.String protoName,
Technology tech,
double width,
double height,
SizeOffset offset,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters. |
static PrimitiveNode |
newInstance(java.lang.String protoName,
Technology tech,
double width,
double height,
java.lang.String minSizeRule,
SizeOffset offset,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters. |
static PrimitiveNode |
newInstance0(java.lang.String protoName,
Technology tech,
double width,
double height,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters. |
static void |
resetAllVisibility()
Method to reset the cache of PrimitiveNode visibility. |
void |
resize(Technology.DistanceContext context)
|
void |
setArcsShrink()
Method to set this PrimitiveNode so that arcs connected to instances will shrink in nonmanhattan situations. |
void |
setArcsWipe()
Method to set this PrimitiveNode so that instances of it are "arc-wipable". |
void |
setAutoGrowth(double dX,
double dY)
Method to set the auto-growth factor on this PrimitiveNode. |
void |
setCanBeZeroSize()
Method to set this PrimitiveNode so that it can be zero in size. |
void |
setCanShrink()
Method to allow instances of this PrimitiveNode to shrink. |
void |
setDefSize(double defWidth,
double defHeight)
Method to set the default size of this PrimitiveNode. |
void |
setEdgeSelect()
Method to set this PrimitiveNode so that instances of it are selectable only by their edges. |
void |
setElectricalLayers(Technology.NodeLayer[] electricalLayers)
Method to set the list of electrical Layers that comprise this PrimitiveNode. |
protected void |
setFactoryDefSize(double defWidth,
double defHeight)
Method to set the factory-default width of this PrimitiveNode. |
void |
setFunction(PrimitiveNode.Function function)
Method to set the function of this PrimitiveNode. |
void |
setHoldsOutline()
Method to set this PrimitiveNode so that instances of it may hold outline information. |
void |
setLayers(Technology.NodeLayer[] layers)
Method to reset the list of Layers that comprise this PrimitiveNode. |
void |
setLockedPrim()
Method to set this PrimitiveNode so that instances of it are locked. |
void |
setMinSize(double minWidth,
double minHeight,
java.lang.String minSizeRule)
Method to set the minimum height of this PrimitiveNode. |
void |
setNodeBit(int bit)
Method to set certain bit during construction |
void |
setNodeInvisible(boolean invisible)
Method to set this PrimitiveNode to be completely invisible, and unselectable. |
void |
setNotUsed(boolean set)
Method to set this PrimitiveNode so that it is not used. |
void |
setPrimNodeIndexInTech(int index)
Method to set the index of this node in its Technology. |
void |
setSizeOffset(SizeOffset offset)
Method to set the size offset of this PrimitiveNode. |
void |
setSkipSizeInPalette()
Method to allow instances of this PrimitiveNode not to be considered in tech palette for the calculation of the largest icon. |
void |
setSpecialType(int specialType)
Method to set the special type of this PrimitiveNode. |
void |
setSpecialValues(double[] specialValues)
Method to set the special values stored on this PrimitiveNode. |
void |
setSpiceTemplate(java.lang.String st)
Method to set the Spice template on this PrimitiveNode. |
void |
setSquare()
Method to set this PrimitiveNode so that instances of it are "square". |
void |
setWipeOn1or2()
Method to set this PrimitiveNode so that instances of it are wiped when 1 or 2 arcs connect. |
java.lang.String |
toString()
Returns a printable version of this PrimitiveNode. |
protected java.lang.Object |
writeReplace()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NORMAL
public static final int SERPTRANS
public static final int POLYGONAL
public static final int LOWVTBIT
public static final int HIGHVTBIT
public static final int NATIVEBIT
public static final int OD18BIT
public static final int OD25BIT
public static final int OD33BIT
Constructor Detail |
---|
protected PrimitiveNode(java.lang.String protoName, Technology tech, EPoint sizeCorrector1, EPoint sizeCorrector2, java.lang.String minSizeRule, double defWidth, double defHeight, ERectangle fullRectangle, ERectangle baseRectangle, Technology.NodeLayer[] layers)
Method Detail |
---|
protected java.lang.Object writeReplace()
public static PrimitiveNode newInstance(java.lang.String protoName, Technology tech, double width, double height, java.lang.String minSizeRule, SizeOffset offset, Technology.NodeLayer[] layers)
protoName
- the name of the PrimitiveNode.
Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).tech
- the Technology of the PrimitiveNode.width
- the width of the PrimitiveNode.height
- the height of the PrimitiveNode.minSizeRule
- name of minimal size ruleoffset
- the offset from the edges of the reported/selected part of the PrimitiveNode.layers
- the Layers that comprise the PrimitiveNode.
public static PrimitiveNode newInstance(java.lang.String protoName, Technology tech, double width, double height, SizeOffset offset, Technology.NodeLayer[] layers)
protoName
- the name of the PrimitiveNode.
Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).tech
- the Technology of the PrimitiveNode.width
- the width of the PrimitiveNode.height
- the height of the PrimitiveNode.offset
- the offset from the edges of the reported/selected part of the PrimitiveNode.layers
- the Layers that comprise the PrimitiveNode.
public static PrimitiveNode newInstance0(java.lang.String protoName, Technology tech, double width, double height, Technology.NodeLayer[] layers)
protoName
- the name of the PrimitiveNode.
Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).tech
- the Technology of the PrimitiveNode.width
- the width of the PrimitiveNode.height
- the height of the PrimitiveNode.layers
- the Layers that comprise the PrimitiveNode.
public PrimitiveNodeId getId()
getId
in interface NodeProto
public java.lang.String getName()
getName
in interface NodeProto
public java.lang.String getFullName()
public void setFunction(PrimitiveNode.Function function)
function
- the new function of this PrimitiveNode.public PrimitiveNode.Function getFunction()
getFunction
in interface NodeProto
public PrimitiveNode.Function getGroupFunction()
public Technology.NodeLayer[] getLayers()
public void setLayers(Technology.NodeLayer[] layers)
layers
- public java.util.Iterator<Layer> getLayerIterator()
public Technology.NodeLayer[] getElectricalLayers()
public void setElectricalLayers(Technology.NodeLayer[] electricalLayers)
electricalLayers
- the list of electrical Layers that comprise this PrimitiveNode.public Technology.NodeLayer findNodeLayer(Layer layer, boolean electrical)
layer
- the Layer to find.
public boolean hasMultiCuts()
public Technology.NodeLayer findMulticut()
public boolean isMulticut()
public int getDefPlacementAngle()
protected void setFactoryDefSize(double defWidth, double defHeight)
defWidth
- the factory-default width of this PrimitiveNode.defHeight
- the factory-default height of this PrimitiveNode.public void setDefSize(double defWidth, double defHeight)
defWidth
- the new default width of this PrimitiveNode.defHeight
- the new default height of this PrimitiveNode.public double getDefWidth()
getDefWidth
in interface NodeProto
public double getDefHeight()
getDefHeight
in interface NodeProto
public double getDefaultLambdaBaseWidth()
public double getDefaultLambdaBaseHeight()
public long getDefaultGridBaseWidth()
public long getDefaultGridBaseHeight()
public double getDefaultLambdaExtendX()
public double getDefaultLambdaExtendY()
public long getDefaultGridExtendX()
public long getDefaultGridExtendY()
public SizeOffset getProtoSizeOffset()
getProtoSizeOffset
in interface NodeProto
public ERectangle getBaseRectangle()
public ERectangle getFullRectangle()
public PrimitiveNode.NodeSizeRule getMinSizeRule()
public void setMinSize(double minWidth, double minHeight, java.lang.String minSizeRule)
minHeight
- the minimum height of this PrimitiveNode.public void setSizeOffset(SizeOffset offset)
offset
- the size offset of this PrimitiveNode.public void resize(Technology.DistanceContext context)
public void setAutoGrowth(double dX, double dY)
dX
- the X amount to grow this PrimitiveNode when arcs don't fit.dY
- the Y amount to grow this PrimitiveNode when arcs don't fit.public Dimension2D getAutoGrowth()
public void setSpiceTemplate(java.lang.String st)
st
- the Spice template on this PrimitiveNode.public java.lang.String getSpiceTemplate()
public Technology getTechnology()
getTechnology
in interface NodeProto
public void addPrimitivePorts(PrimitivePort[] ports)
ports
- the array of PrimitivePorts to add.public PortProto findPortProto(java.lang.String name)
findPortProto
in interface NodeProto
public PortProto findPortProto(Name name)
findPortProto
in interface NodeProto
public java.util.Iterator<PortProto> getPorts()
getPorts
in interface NodeProto
public java.util.Iterator<PrimitivePort> getPrimitivePorts()
public int getNumPorts()
getNumPorts
in interface NodeProto
public final PrimitivePort getPort(int portIndex)
getPort
in interface NodeProto
portIndex
- specified position of PortProto.
public PrimitivePort getPort(PortProtoId portProtoId)
getPort
in interface NodeProto
portProtoId
- thread-independent PortProtoId.
java.lang.IllegalArgumentException
- if portProtoId is not from this NodeProto.public PrimitivePort connectsTo(ArcProto arc)
arc
- the type of arc to connect to an instance of this PrimitiveNode.
public int getSpecialType()
public void setSpecialType(int specialType)
specialType
- the newspecial type of this PrimitiveNode.
It can be NORMAL, SERPTRANS, POLYGONAL, or MULTICUT.public static java.lang.String getSpecialTypeName(int t)
t
- the integer special type.
public double[] getSpecialValues()
public EPoint getMulticut2Size()
public void setSpecialValues(double[] specialValues)
specialValues
- the special values for this PrimitiveNode.public boolean isPin()
public java.lang.String describe(boolean withQuotes)
describe
in interface NodeProto
withQuotes
- to wrap description between quotes
public boolean isNodeBitOn(int bit)
bit
- bit containing information to query. It could be LOWVTTRANS,
HIGHVTTRANS, NATIVETRANS, OD18TRANS, OD25TRANS or OD33TRANS in case of transistors.
public void setNodeBit(int bit)
bit
- public void setSkipSizeInPalette()
public boolean isSkipSizeInPalette()
public void setCanShrink()
public void clearCanShrink()
public boolean canShrink()
public void setArcsWipe()
public void clearArcsWipe()
public boolean isArcsWipe()
public void setSquare()
public void clearSquare()
public boolean isSquare()
public void setHoldsOutline()
public void clearHoldsOutline()
public boolean isHoldsOutline()
public void setCanBeZeroSize()
public void clearCanBeZeroSize()
public boolean isCanBeZeroSize()
public void setWipeOn1or2()
public void clearWipeOn1or2()
public boolean isWipeOn1or2()
public void setLockedPrim()
public void clearLockedPrim()
public boolean isLockedPrim()
public void setEdgeSelect()
public void clearEdgeSelect()
public boolean isEdgeSelect()
public void setArcsShrink()
public void clearArcsShrink()
public boolean isArcsShrink()
public void setNodeInvisible(boolean invisible)
invisible
- true to make this PrimitiveNode completely invisible and unselectable.public boolean isNodeInvisible()
public void setNotUsed(boolean set)
set
- public static void resetAllVisibility()
public boolean isVisible()
public boolean isNotUsed()
public boolean isPureWellNode()
public boolean isPureSubstrateNode()
public final int getPrimNodeIndexInTech()
public void setPrimNodeIndexInTech(int index)
index
- the index to use for this node in its Technology.public int compareTo(PrimitiveNode that)
compareTo
in interface java.lang.Comparable<PrimitiveNode>
that
- the other PrimitiveNode.
public java.lang.String toString()
toString
in class java.lang.Object
public void getZValues(double[] array)
array
- array[0] is minZ and array[1] is max
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |