public class RouteElementPort extends RouteElement
RouteElement.RouteElementAction
Modifier and Type | Method and Description |
---|---|
void |
addConnectingNewArc(RouteElementArc re)
Book-keeping: Adds a newArc RouteElement to a list to keep
track of what newArc elements use this object as an end point.
|
void |
addHighlightArea(Highlighter highlighter)
Adds RouteElement to highlights
|
static RouteElementPort |
deleteNode(NodeInst nodeInstToDelete,
EditingPreferences ep)
Factory method for making a deleteNode RouteElement
|
ElectricObject |
doAction(EditingPreferences ep)
Perform the action specified by RouteElementAction action.
|
static RouteElementPort |
existingPortInst(PortInst existingPortInst,
EPoint portInstSite,
EditingPreferences ep)
Factory method for making a dummy RouteElement for an
existing PortInst.
|
static RouteElementPort |
existingPortInst(PortInst existingPortInst,
Poly portInstSite,
EditingPreferences ep)
Factory method for making a dummy RouteElement for an
existing PortInst.
|
int |
getConnectingArcAngle(ArcProto ap)
Get the angle of any arcs connected to this RouteElement.
|
Poly |
getConnectingSite()
Get a polygon that defines the port dimensions.
|
java.awt.geom.Point2D |
getLocation()
Returns location of newNode, existingPortInst, or deleteNode,
or null otherwise
|
java.util.Iterator<RouteElement> |
getNewArcs()
Get an iterator over any newArc RouteElements connected to this
newNode RouteElement.
|
NodeInst |
getNodeInst()
Get Connecting Node on RouteElement.
|
NodeProto |
getNodeProto()
Get the NodeProto for connecting to this RouteElementPort.
|
EDimension |
getNodeSize()
Get the size of a newNode, or the NodeInst an existingPortInst
is attached to.
|
PortInst |
getPortInst()
Get Connecting Port on RouteElement.
|
PortProto |
getPortProto()
Get the PortProto for connecting to this RouteElementPort.
|
double |
getWidestConnectingArc(ArcProto ap)
Get largest arc width of newArc RouteElements attached to this
RouteElement.
|
double |
getWidestConnectingArc(ArcProto ap,
int arcAngle)
Get largest arc width of newArc RouteElements attached to this
RouteElement.
|
boolean |
isBisectArcPin()
see setBisectArcPin
|
static RouteElementPort |
newNode(Cell cell,
NodeProto np,
PortProto newNodePort,
java.awt.geom.Point2D location,
double width,
double height,
Orientation orient,
EditingPreferences ep)
Factory method for making a newNode RouteElement.
|
static RouteElementPort |
newNodeOtherPort(Cell cell,
RouteElementPort rep,
PortProto newNodePort,
EditingPreferences ep) |
void |
removeConnectingNewArc(RouteElementArc re)
Remove a newArc that connects to this newNode or existingPortInst.
|
void |
setBisectArcPin(boolean state)
Set true by Interactive router if pin used to bisect arc
Router may want to remove this pin later if it places a
connecting contact cut in the same position.
|
void |
setConnectingSite(Poly p)
Set a polygon that defines the port dimensions.
|
void |
setNodeSize(EDimension size,
EditingPreferences ep)
Set the size of a newNode.
|
java.lang.String |
toString()
Return string describing the RouteElement
|
getAction, getCell, isDone, isShowHighlight, setDone, setShowHighlight
public static RouteElementPort newNode(Cell cell, NodeProto np, PortProto newNodePort, java.awt.geom.Point2D location, double width, double height, Orientation orient, EditingPreferences ep)
cell
- the Cell to put the new RouteElement innp
- Type of NodeInst to makelocation
- the location of the new NodeInstwidth
- the width of the new NodeInstheight
- the height of the new NodeInstorient
- the Orientation of the new NodeInstep
- EditingPreferences with default sizespublic static RouteElementPort newNodeOtherPort(Cell cell, RouteElementPort rep, PortProto newNodePort, EditingPreferences ep)
public static RouteElementPort deleteNode(NodeInst nodeInstToDelete, EditingPreferences ep)
nodeInstToDelete
- the nodeInst to deleteep
- EditingPreferences with default sizespublic static RouteElementPort existingPortInst(PortInst existingPortInst, EPoint portInstSite, EditingPreferences ep)
existingPortInst
- the already existing portInst to connect toportInstSite
- ep
- EditingPreferences with default sizespublic static RouteElementPort existingPortInst(PortInst existingPortInst, Poly portInstSite, EditingPreferences ep)
existingPortInst
- the already existing portInst to connect toportInstSite
- ep
- EditingPreferences with default sizespublic NodeProto getNodeProto()
public PortProto getPortProto()
public PortInst getPortInst()
public NodeInst getNodeInst()
public java.awt.geom.Point2D getLocation()
public void setBisectArcPin(boolean state)
public boolean isBisectArcPin()
public void addConnectingNewArc(RouteElementArc re)
re
- the RouteElement to add.public void removeConnectingNewArc(RouteElementArc re)
re
- the RouteElement to removepublic double getWidestConnectingArc(ArcProto ap)
Note that these width values should have been pre-adjusted for the arc width offset, so these values have had the offset subtracted away.
public double getWidestConnectingArc(ArcProto ap, int arcAngle)
Note that these width values should have been pre-adjusted for the arc width offset, so these values have had the offset subtracted away.
public int getConnectingArcAngle(ArcProto ap)
ap
- the arc prototypepublic java.util.Iterator<RouteElement> getNewArcs()
public EDimension getNodeSize()
public void setNodeSize(EDimension size, EditingPreferences ep)
size
- the new sizeep
- EditingPreferences with default sizespublic Poly getConnectingSite()
public void setConnectingSite(Poly p)
p
- the polygon that defines the port location.public ElectricObject doAction(EditingPreferences ep)
doAction
in class RouteElement
ep
- EditingPreferencespublic void addHighlightArea(Highlighter highlighter)
addHighlightArea
in class RouteElement
public java.lang.String toString()
toString
in class RouteElement