|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.technology.PrimitivePort
public class PrimitivePort
A PrimitivePort lives in a PrimitiveNode in a Tecnology. It contains a list of ArcProto types that it accepts connections from.
Method Summary | |
---|---|
int |
compareTo(PrimitivePort that)
Compares PrimtivePorts by their PrimitiveNodes and definition order. |
boolean |
connectsTo(ArcProto arc)
Method to return true if this PrimitivePort can connect to an arc of a given type. |
int |
getAngle()
Method to return the angle of this PrimitivePort. |
int |
getAngleRange()
Method to return the angle range of this PrimitvePort. |
PrimitivePort |
getBasePort()
Method to return the base-level port that this PortProto is created from. |
EdgeV |
getBottom()
Method to return the bottom edge of the PrimitivePort as a value that scales with the actual NodeInst. |
PortCharacteristic |
getCharacteristic()
Method to return the PortCharacteristic of this PortProto. |
ArcProto |
getConnection()
Method to return one of allowable connections on this PrimitivePort. |
ArcProto[] |
getConnections()
Method to return the list of allowable connections on this PrimitivePort. |
ArcProto[] |
getConnections(TechPool allTechs)
Method to return the list of allowable connections on this PrimitivePort. |
PrimitivePortId |
getId()
Method to return PortProtoId of this PrimitivePort. |
EdgeH |
getLeft()
Method to return the left edge of the PrimitivePort as a value that scales with the actual NodeInst. |
java.lang.String |
getName()
Method to return the name of this PrimitivePort. |
Name |
getNameKey()
Method to return the name key of this PrimitivePort. |
PrimitiveNode |
getParent()
Method to return the parent NodeProto of this PrimitivePort. |
java.awt.Color |
getPortColor()
Method to compute the color of this PrimitivePort. |
int |
getPortIndex()
Method to get the index of this PrimitivePort. |
EdgeH |
getRight()
Method to return the right edge of the PrimitivePort as a value that scales with the actual NodeInst. |
EdgeV |
getTop()
Method to return the top edge of the PrimitivePort as a value that scales with the actual NodeInst. |
int |
getTopology()
Method to get the topology of this PrimitivePort. |
boolean |
isGround()
Method to determine whether this PrimitivePort is of type Ground. |
boolean |
isIsolated()
Method to tell whether this PrimitivePort is isolated. |
boolean |
isNamedGround()
Method to determine whether this PortProto has a name that suggests Ground. |
boolean |
isNegatable()
Method to tell whether this type of port can be negated. |
boolean |
isPower()
Method to determine whether this PrimitivePort is of type Power. |
static PrimitivePort |
newInstance(Technology tech,
PrimitiveNode parent,
ArcProto[] portArcs,
java.lang.String protoName,
int portAngle,
int portRange,
int portTopology,
PortCharacteristic characteristic,
EdgeH left,
EdgeV bottom,
EdgeH right,
EdgeV top)
Method to create a new PrimitivePort from the parameters. |
void |
setConnections(ArcProto[] portArcs)
Method to set the list of allowable connections on this PrimitivePort. |
void |
setIsolated()
Method to set this PrimitivePort to be isolated. |
void |
setNegatable(boolean negatable)
Method to tell set this type of port can be negated. |
java.lang.String |
toString()
Returns a printable version of this PrimitivePort. |
protected java.lang.Object |
writeReplace()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
protected java.lang.Object writeReplace()
public static PrimitivePort newInstance(Technology tech, PrimitiveNode parent, ArcProto[] portArcs, java.lang.String protoName, int portAngle, int portRange, int portTopology, PortCharacteristic characteristic, EdgeH left, EdgeV bottom, EdgeH right, EdgeV top)
tech
- the Technology in which this PrimitivePort is being created.parent
- the PrimitiveNode on which this PrimitivePort resides.portArcs
- an array of ArcProtos which can connect to this PrimitivePort.protoName
- the name of this PrimitivePort.
It may not have unprintable characters, spaces, or tabs in it.portAngle
- the primary angle that the PrimitivePort faces on the PrimitiveNode (in degrees).
This angle is measured counter-clockwise from a right-pointing direction.portRange
- the range about the angle of allowable connections (in degrees).
Arcs must connect to this port within this many degrees of the port connection angle.
When this value is 180, then all angles are permissible, since arcs
can connect at up to 180 degrees in either direction from the port angle.portTopology
- is a small integer that is unique among PrimitivePorts on the PrimitiveNode.
When two PrimitivePorts have the same topology number, it indicates that these ports are connected.characteristic
- describes the nature of this PrimitivePort (input, output, power, ground, etc.)left
- is an EdgeH that describes the left side of the port in a scalable way.bottom
- is an EdgeV that describes the bottom side of the port in a scalable way.right
- is an EdgeH that describes the right side of the port in a scalable way.top
- is an EdgeV that describes the top side of the port in a scalable way.
public PrimitivePortId getId()
getId
in interface PortProto
public Name getNameKey()
getNameKey
in interface PortProto
public java.lang.String getName()
getName
in interface PortProto
public PrimitiveNode getParent()
getParent
in interface PortProto
public int getPortIndex()
getPortIndex
in interface PortProto
public void setConnections(ArcProto[] portArcs)
portArcs
- an array of ArcProtos which can connect to this PrimitivePort.public ArcProto[] getConnections(TechPool allTechs)
allTechs
- pool of all known technologies
public ArcProto[] getConnections()
public ArcProto getConnection()
public PrimitivePort getBasePort()
getBasePort
in interface PortProto
public EdgeH getLeft()
public EdgeH getRight()
public EdgeV getTop()
public EdgeV getBottom()
public PortCharacteristic getCharacteristic()
getCharacteristic
in interface PortProto
public boolean isPower()
isPower
in interface PortProto
public boolean isGround()
isGround
in interface PortProto
public boolean isNamedGround()
public int getAngle()
public int getAngleRange()
public int getTopology()
public void setIsolated()
public boolean isIsolated()
public boolean isNegatable()
public void setNegatable(boolean negatable)
negatable
- true if this type of port can be negated.public boolean connectsTo(ArcProto arc)
connectsTo
in interface PortProto
arc
- the ArcProto to test for connectivity.
public java.awt.Color getPortColor()
public int compareTo(PrimitivePort that)
compareTo
in interface java.lang.Comparable<PrimitivePort>
that
- the other PrimitivePort.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |