graphlab.gui.core.graph.edge
Class EdgeModel

java.lang.Object
  extended by graphlab.library.BaseEdge<VertexModel>
      extended by graphlab.gui.core.graph.edge.EdgeModel
All Implemented Interfaces:
AttributeListener, NotifiableAttributeSet, java.lang.Comparable<BaseEdge<VertexModel>>

public class EdgeModel
extends BaseEdge<VertexModel>
implements NotifiableAttributeSet, AttributeListener

User: azin azadi,roozbeh ebrahimi


Field Summary
 BlackBoard blackboard
           
static java.lang.String DIRECTED
           
 Edge edge
           
static java.lang.String ID
           
static java.lang.String SOURCE
           
static java.lang.String TARGET
           
static java.lang.String WEIGHT
           
 
Fields inherited from class graphlab.library.BaseEdge
head, tail
 
Constructor Summary
EdgeModel(Edge edge, Edge sec)
           
EdgeModel(VertexModel v1, VertexModel v2)
           
 
Method Summary
 void addAttributeListener(AttributeListener attributeListener, java.lang.String[] attrNames)
          Add a listener to changes of an AttributeSet.
 void attributeUpdated(java.lang.String name, java.lang.Object oldVal, java.lang.Object newVal)
           
 java.util.Collection<AttributeListener> getAttributeListeners(java.lang.String attrName)
           
 AttributeSet getAttributes()
           
 Edge getEdgeReference()
           
 void removeAttributeListener(AttributeListener attributeListener)
          Remove a listener from list of listeners.
 void setColor(int color)
          Sets the color of the edge.
 void setEdge(Edge edge)
           
 void setMark(boolean m)
          Sets the mark of the edge.
 void setProp(BaseEdgeProperties prop)
          Sets properties object for this edge; Overwrites the existing.
 void setSourceTarget(Vertex source, Vertex target)
           
 void setWeight(int weight)
          Sets the weight of the edge.
 
Methods inherited from class graphlab.library.BaseEdge
compareTo, getColor, getMark, getProp, getWeight
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE

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

TARGET

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

DIRECTED

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

ID

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

WEIGHT

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

edge

public Edge edge

blackboard

public BlackBoard blackboard
Constructor Detail

EdgeModel

public EdgeModel(Edge edge,
                 Edge sec)

EdgeModel

public EdgeModel(VertexModel v1,
                 VertexModel v2)
Method Detail

getEdgeReference

public Edge getEdgeReference()

getAttributes

public AttributeSet getAttributes()
Specified by:
getAttributes in interface NotifiableAttributeSet
Returns:
container of attributes.

addAttributeListener

public void addAttributeListener(AttributeListener attributeListener,
                                 java.lang.String[] attrNames)
Description copied from interface: NotifiableAttributeSet
Add a listener to changes of an AttributeSet.
It's better to use a List because of getAttributeListeners() method. the listener will be listened for the given attrNames, if attrNames=null it means that the listener will be notified for every attribute change.

Specified by:
addAttributeListener in interface NotifiableAttributeSet
Parameters:
attributeListener - the listener!
attrNames - the name of attributes to addListener for change

getAttributeListeners

public java.util.Collection<AttributeListener> getAttributeListeners(java.lang.String attrName)
Specified by:
getAttributeListeners in interface NotifiableAttributeSet
Returns:
List of listeners

removeAttributeListener

public void removeAttributeListener(AttributeListener attributeListener)
Description copied from interface: NotifiableAttributeSet
Remove a listener from list of listeners.

Specified by:
removeAttributeListener in interface NotifiableAttributeSet

setSourceTarget

public void setSourceTarget(Vertex source,
                            Vertex target)

setMark

public void setMark(boolean m)
Description copied from class: BaseEdge
Sets the mark of the edge.

Overrides:
setMark in class BaseEdge<VertexModel>
Parameters:
m - Sets m as the mark of the edge.

setWeight

public void setWeight(int weight)
Description copied from class: BaseEdge
Sets the weight of the edge.

Overrides:
setWeight in class BaseEdge<VertexModel>

setProp

public void setProp(BaseEdgeProperties prop)
Description copied from class: BaseEdge
Sets properties object for this edge; Overwrites the existing.

Overrides:
setProp in class BaseEdge<VertexModel>
Parameters:
prop - The property object to set.

setColor

public void setColor(int color)
Description copied from class: BaseEdge
Sets the color of the edge.

Overrides:
setColor in class BaseEdge<VertexModel>

attributeUpdated

public void attributeUpdated(java.lang.String name,
                             java.lang.Object oldVal,
                             java.lang.Object newVal)
Specified by:
attributeUpdated in interface AttributeListener

setEdge

public void setEdge(Edge edge)