uci.gef.demo
Class EdgePower

java.lang.Object
  |
  +--uci.gef.NetPrimitive
        |
        +--uci.gef.NetEdge
              |
              +--uci.gef.demo.EdgePower

public class EdgePower
extends NetEdge
implements Serializable

A sample NetEdge subclass for use in the example application. This represents a power cord that can go from the computer to the wall, or from the printer to the wall.

See Also:
Serialized Form

Field Summary
protected  boolean _hasGroundProng
          Some power cords have a third grounding prong, some don't.
protected  int _maxVoltage
          Maximum Voltage that this line can handle.
protected  int _voltage
          Voltage currently on line.
 
Fields inherited from class uci.gef.NetEdge
_destPort, _ports, _sourcePort
 
Fields inherited from class uci.gef.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
EdgePower()
           
 
Method Summary
 boolean getHasGroundProng()
           
 int getMaxVoltage()
           
 int getVoltage()
           
 FigEdge makePresentation(Layer lay)
           
 void setHasGroundProng(boolean hgp)
           
 void setMaxVoltage(int v)
           
 void setVoltage(int v)
           
 
Methods inherited from class uci.gef.NetEdge
connect, dispose, getDestPort, getPorts, getSourcePort, otherEnd, presentationFor, setDestPort, setPorts, setSourcePort
 
Methods inherited from class uci.gef.NetPrimitive
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getHighlight, removePropertyChangeListener, setHighlight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_voltage

protected int _voltage
Voltage currently on line.

_maxVoltage

protected int _maxVoltage
Maximum Voltage that this line can handle.

_hasGroundProng

protected boolean _hasGroundProng
Some power cords have a third grounding prong, some don't.
Constructor Detail

EdgePower

public EdgePower()
Method Detail

setVoltage

public void setVoltage(int v)

getVoltage

public int getVoltage()

setMaxVoltage

public void setMaxVoltage(int v)

getMaxVoltage

public int getMaxVoltage()

setHasGroundProng

public void setHasGroundProng(boolean hgp)

getHasGroundProng

public boolean getHasGroundProng()

makePresentation

public FigEdge makePresentation(Layer lay)
Overrides:
makePresentation in class NetEdge