org.tigris.gef.demo
Class NodeCPU
java.lang.Object
org.tigris.gef.graph.presentation.NetPrimitive
org.tigris.gef.graph.presentation.NetNode
org.tigris.gef.demo.NodeCPU
- All Implemented Interfaces:
- GraphNodeHooks, java.io.Serializable
- public class NodeCPU
- extends NetNode
- implements java.io.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
Fields inherited from class org.tigris.gef.graph.presentation.NetNode |
_ports |
Methods inherited from class org.tigris.gef.graph.presentation.NetNode |
addPort, canConnectTo, dispose, getAttributes, getPort, getPorts, postConnect, postDisconnect, postPlacement, presentationFor, setPorts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pMEGS_OF_RAM
public static final java.lang.String pMEGS_OF_RAM
- See Also:
- Constant Field Values
pBUS_SPEED_MHZ
public static final java.lang.String pBUS_SPEED_MHZ
- See Also:
- Constant Field Values
pCPU_SPEED_MHZ
public static final java.lang.String pCPU_SPEED_MHZ
- See Also:
- Constant Field Values
pHAS_CD_ROM
public static final java.lang.String pHAS_CD_ROM
- See Also:
- Constant Field Values
pOWNER_INFO
public static final java.lang.String pOWNER_INFO
- See Also:
- Constant Field Values
_megsOfRAM
protected int _megsOfRAM
_busSpeedMHz
protected int _busSpeedMHz
_cpuSpeedMHz
protected int _cpuSpeedMHz
_hasCDROM
protected boolean _hasCDROM
_ownerInfo
protected java.lang.String _ownerInfo
NodeCPU
public NodeCPU()
initialize
public void initialize(java.util.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.
- Specified by:
initialize
in interface GraphNodeHooks
- Specified by:
initialize
in class NetNode
getId
public java.lang.String getId()
- Specified by:
getId
in class NetPrimitive
getMegsOfRAM
public int getMegsOfRAM()
getBusSpeedMHz
public int getBusSpeedMHz()
getCPUSpeedMhz
public int getCPUSpeedMhz()
getHasCDROM
public boolean getHasCDROM()
getOwnerInfo
public java.lang.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(java.lang.String oi)
makePresentation
public org.tigris.gef.presentation.FigNode makePresentation(Layer lay)
- Description copied from class:
NetNode
- Construct and return a new FigNode to present this NetNode
in the given Layer. A default implementation is supplied as an
example, but all subclasses should override this method. NetPorts
of this NetNode should be associated with individual Figs that
make up the FigNode.
- Specified by:
makePresentation
in class NetNode