uci.gef.demo
Class PortPower
java.lang.Object
|
+--uci.gef.NetPrimitive
|
+--uci.gef.NetPort
|
+--uci.gef.demo.PortPower
- public class PortPower
- extends NetPort
- implements Serializable
An example subclass of NetPort for the EquipmentApplet demo. As
part of the example I constrain the ports to only connect to
PortPowers.
- See Also:
EquipmentApplet, Serialized Form
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SOCKET
public static final int SOCKET
RECEPTICAL
public static final int RECEPTICAL
_type
protected int _type
PortPower
public PortPower(NetNode parent,
int type)
type
public int type()
type
public void type(int t)
defaultEdgeClass
protected Class defaultEdgeClass(NetPort otherPort)
- Overrides:
- defaultEdgeClass in class NetPort
canConnectTo
public boolean canConnectTo(GraphModel gm,
Object otherPort)
- Add the constraint that PortPowers can only be connected to
other ports of the same type. And SOCKETs can only be connected
to RECEPTICALs.
- Overrides:
- canConnectTo in class NetPort