public class PortInst extends ElectricObject implements SteinerTree.SteinerTreePort
This class is thread-safe.
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 PortInsts to an array of Poly objects.
|
void |
addVar(Variable var)
Method to add a Variable on this PortInst.
|
boolean |
compare(java.lang.Object obj,
java.lang.StringBuffer buffer)
This function is to compare PortInst elements.
|
Poly |
computeTextPoly(EditWindow0 wnd,
Variable var,
Name name) |
void |
delVar(Variable.Key key)
Method to delete a Variable from this PortInst.
|
void |
delVars()
Method to delete all Variables of this PortInst.
|
java.lang.String |
describe(boolean withQuotes)
Method to describe this NodeInst as a string.
|
FixpRectangle |
getBounds()
Method to return the bounds of this PortInst.
|
EPoint |
getCenter() |
java.util.Iterator<Connection> |
getConnections()
Get iterator of all Connections
that connect to this PortInst
|
ImmutablePortInst |
getD()
Returns persistent data of this ElectricObject with Variables.
|
EDatabase |
getDatabase()
Returns database to which this PortInst belongs.
|
java.util.Iterator<Export> |
getExports()
Get iterator of all Exports
that connect to this PortInst
|
NodeInst |
getNodeInst()
Method to return the NodeInst that this PortInst resides on.
|
Poly |
getPoly()
Method to return the Poly that describes this PortInst.
|
int |
getPortIndex()
Method to get the index of this PortInst in NodeInst ports.
|
PortProto |
getPortProto()
Method to return the PortProto that this PortInst is an instance of.
|
boolean |
hasConnections()
Returns true of there are Connections on this PortInst.
|
boolean |
isLinked()
Overrides ElectricObject.isLinked().
|
static PortInst |
newInstance(PortProto portProto,
NodeInst nodeInst)
Method to create a PortInst object.
|
java.lang.String |
toString()
Returns a printable version of this PortInst.
|
addPolyList, check, checkChanging, checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, getArtwork, getCode, getDisplayableVariables, getFullDescription, getGeneric, getInfo, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getParameterOrVariable, getParametersAndVariables, getReadableName, getSchematics, getTechPool, getTextBounds, getTextDescriptor, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, isDeprecatedVariable, isParam, newDisplayVar, newDisplayVar, newVar, newVar, newVar, newVar, newVar, renameVar, renameVar, setOff, setTextDescriptor, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText, whichCell
public ImmutablePortInst getD()
getD
in class ElectricObject
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 delVars()
public static PortInst newInstance(PortProto portProto, NodeInst nodeInst)
portProto
- the PortProto on the prototype of the NodeInst.nodeInst
- the NodeInst that owns the port.public NodeInst getNodeInst()
public PortProto getPortProto()
public final int getPortIndex()
public boolean hasConnections()
IllegalArgumetException
- if node inst is not linked to this CellRevisionpublic java.util.Iterator<Connection> getConnections()
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 FixpRectangle getBounds()
public EPoint getCenter()
getCenter
in interface SteinerTree.SteinerTreePort
public Poly getPoly()
public 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 PortInsts reside.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 multiline text into multiple Polys.showTempNames
- show temporary names on nodes and arcspublic java.lang.String describe(boolean withQuotes)
withQuotes
- to wrap description between quotespublic java.lang.String toString()
toString
in class ElectricObject
public boolean compare(java.lang.Object obj, java.lang.StringBuffer buffer)
obj
- Object to compare tobuffer
- To store comparison messages in case of failurepublic boolean isLinked()
isLinked
in class ElectricObject
public EDatabase getDatabase()
getDatabase
in class ElectricObject
public Poly computeTextPoly(EditWindow0 wnd, Variable var, Name name)