Class EdgeData

  extended by org.tigris.gef.graph.presentation.NetPrimitive
      extended by org.tigris.gef.graph.presentation.NetEdge
          extended by org.tigris.gef.demo.EdgeData
All Implemented Interfaces:, GraphEdgeHooks

public class EdgeData
extends NetEdge

A sample NetEdge subclass for use in the Example application. There are no real details here yet. If I was to expand this example more the Edge could have more attributes, e.g. bandwidth... and it could have its own subclasses of FigEdge to make it look a certain way.

See Also:
Serialized Form

Field Summary
protected  int _bitsPerSecond
          Speed of this data line
protected  java.lang.String _cableType
          Type of cable, choosen from the constants above: SCSI, FireWire, etc.
static java.util.Vector _PossibleCableTypes
static java.lang.String CABLE_ETHERNET
static java.lang.String CABLE_FDDI
static java.lang.String CABLE_FIREWIRE
static java.lang.String CABLE_SCSI
static java.lang.String pBITS_PER_SECOND
static java.lang.String pCABLE_TYPE
Fields inherited from class org.tigris.gef.graph.presentation.NetEdge
_destPort, _ports, _sourcePort
Fields inherited from class org.tigris.gef.graph.presentation.NetPrimitive
_changeSup, _highlight
Constructor Summary
Method Summary
 int getBitsPerSecond()
 java.lang.String getCableType()
 java.lang.String getId()
 FigEdge makePresentation(Layer lay)
          Abstract method that returns a FigEdge to represent this edge in a given Layer.
 void setBitsPerSecond(int bps)
 void setCableType(java.lang.String ct)
Methods inherited from class org.tigris.gef.graph.presentation.NetEdge
connect, deleteFromModel, getDestPort, getPorts, getSourcePort, otherEnd, presentationFor, setDestPort, setPorts, setSourcePort
Methods inherited from class org.tigris.gef.graph.presentation.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
Methods inherited from interface org.tigris.gef.graph.GraphEdgeHooks
addPropertyChangeListener, removePropertyChangeListener, setHighlight

Field Detail


public static final java.lang.String pCABLE_TYPE
See Also:
Constant Field Values


public static final java.lang.String pBITS_PER_SECOND
See Also:
Constant Field Values


public static final java.lang.String CABLE_SCSI
See Also:
Constant Field Values


public static final java.lang.String CABLE_ETHERNET
See Also:
Constant Field Values


public static final java.lang.String CABLE_FIREWIRE
See Also:
Constant Field Values


public static final java.lang.String CABLE_FDDI
See Also:
Constant Field Values


protected int _bitsPerSecond
Speed of this data line


protected java.lang.String _cableType
Type of cable, choosen from the constants above: SCSI, FireWire, etc.


public static java.util.Vector _PossibleCableTypes
Constructor Detail


public EdgeData()
Method Detail


public java.lang.String getId()
Specified by:
getId in class NetPrimitive


public java.lang.String getCableType()


public void setCableType(java.lang.String ct)


public int getBitsPerSecond()


public void setBitsPerSecond(int bps)


public FigEdge makePresentation(Layer lay)
Description copied from class: NetEdge
Abstract method that returns a FigEdge to represent this edge in a given Layer. This is just a quick and simple way to do it if you use a DefaultGraphModel because DefaultgraphEdgeRenderer calls this. Override this method if you want your Edge subclasses to have a different look. The better way to do it is to implement your own GraphEdgeRenderer.

Specified by:
makePresentation in class NetEdge