|
||||||||||
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.PortInst
public class PortInst
The PortInst class represents an instance of a Port. It is the combination of a NodeInst and a PortProto.
This class is thread-safe.
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 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. |
java.awt.geom.Rectangle2D |
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. |
PortProto |
getProtoEquivalent()
Method to return the equivalent PortProto of this PortInst's PortProto. |
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. |
Methods inherited from class com.sun.electric.database.variable.ElectricObject |
---|
check, checkChanging, checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, copyVarsFrom, getArtwork, getCode, getDisplayableVariables, getEditingPreferences, getGeneric, getInfo, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getParameterOrVariable, getParametersAndVariables, getPolyList, getSchematics, getTech, getTechPool, getTextBounds, getTextDescriptor, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, isDeprecatedVariable, isParam, newDisplayVar, newVar, newVar, newVar, newVar, numDisplayableVariables, renameVar, renameVar, setOff, setTextDescriptor, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText, whichCell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
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()
public java.util.Iterator<Connection> getConnections()
public java.util.Iterator<Export> getExports()
public PortProto getProtoEquivalent()
public java.awt.geom.Rectangle2D getBounds()
public EPoint getCenter()
public Poly getPoly()
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 PortInsts reside.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 java.lang.String describe(boolean withQuotes)
withQuotes
- to wrap description between quotes
public 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 failure
public boolean isLinked()
isLinked
in class ElectricObject
public EDatabase getDatabase()
getDatabase
in class ElectricObject
public Poly computeTextPoly(EditWindow0 wnd, Variable var, Name name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |