uci.gef.demo
Class NodeCPU

java.lang.Object
  |
  +--uci.gef.NetPrimitive
        |
        +--uci.gef.NetNode
              |
              +--uci.gef.demo.NodeCPU

public class NodeCPU
extends NetNode
implements Serializable

An example subclass of NetNode for use in the Example application. This class represents a computer that can be plugged into electrical power and attached to a printer. The Computer has attributes that can be set via the property sheet.

See Also:
Example, Serialized Form

Field Summary
protected  int _busSpeedMHz
           
protected  int _cpuSpeedMHz
           
protected  boolean _hasCDROM
           
protected  int _megsOfRAM
           
protected  String _ownerInfo
           
static String pBUS_SPEED_MHZ
           
static String pCPU_SPEED_MHZ
           
static String pHAS_CD_ROM
           
static String pMEGS_OF_RAM
           
static String pOWNER_INFO
           
 
Fields inherited from class uci.gef.NetNode
_ports
 
Fields inherited from class uci.gef.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
NodeCPU()
           
 
Method Summary
 int getBusSpeedMHz()
           
 int getCPUSpeedMhz()
           
 boolean getHasCDROM()
           
 int getMegsOfRAM()
           
 String getOwnerInfo()
           
 void initialize(Hashtable args)
          Initialize a new NodeCPU.
 FigNode makePresentation(Layer lay)
           
 void setBusSpeedMHz(int b)
           
 void setCPUSpeedMhz(int c)
           
 void setHasCDROM(boolean r)
           
 void setMegsOfRAM(int m)
           
 void setOwnerInfo(String oi)
           
 
Methods inherited from class uci.gef.NetNode
addPort, canConnectTo, dispose, getAttributes, getPort, getPorts, postConnect, postDisconnect, postPlacement, presentationFor, setPorts
 
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

pMEGS_OF_RAM

public static final String pMEGS_OF_RAM

pBUS_SPEED_MHZ

public static final String pBUS_SPEED_MHZ

pCPU_SPEED_MHZ

public static final String pCPU_SPEED_MHZ

pHAS_CD_ROM

public static final String pHAS_CD_ROM

pOWNER_INFO

public static final String pOWNER_INFO

_megsOfRAM

protected int _megsOfRAM

_busSpeedMHz

protected int _busSpeedMHz

_cpuSpeedMHz

protected int _cpuSpeedMHz

_hasCDROM

protected boolean _hasCDROM

_ownerInfo

protected String _ownerInfo
Constructor Detail

NodeCPU

public NodeCPU()
Method Detail

initialize

public void initialize(Hashtable args)
Initialize a new NodeCPU.

Needs-More-Work: for now we construct the FigNode programatically in this class. A more powerful way to do it is to make your own sublcass of FigNode.

Overrides:
initialize in class NetNode

getMegsOfRAM

public int getMegsOfRAM()

getBusSpeedMHz

public int getBusSpeedMHz()

getCPUSpeedMhz

public int getCPUSpeedMhz()

getHasCDROM

public boolean getHasCDROM()

getOwnerInfo

public String getOwnerInfo()

setMegsOfRAM

public void setMegsOfRAM(int m)

setBusSpeedMHz

public void setBusSpeedMHz(int b)

setCPUSpeedMhz

public void setCPUSpeedMhz(int c)

setHasCDROM

public void setHasCDROM(boolean r)

setOwnerInfo

public void setOwnerInfo(String oi)

makePresentation

public FigNode makePresentation(Layer lay)
Overrides:
makePresentation in class NetNode