graphlab.gui.core.graph.vertex
Class Vertex

java.lang.Object
  extended by graphlab.gui.core.graph.vertex.Vertex
All Implemented Interfaces:
java.lang.Iterable<EdgeModel>

public class Vertex
extends java.lang.Object
implements java.lang.Iterable<EdgeModel>

Author:
Azin Azadi ,roozbeh Ebrahimi

Field Summary
 BlackBoard blackboard
           
 VertexControl control
           
static int ctr
           
 Graph g
           
static java.lang.String LOCATION
           
 VertexModel model
           
 VertexView view
           
 
Constructor Summary
Vertex()
           
Vertex(BlackBoard b)
           
Vertex(Vertex v)
          the opy constructor, the new vertex will be a copy of the given vertex
 
Method Summary
<t> t
getAtr(java.lang.String id)
           
 int getDegree()
          returns the degree of the vertex, (if the graph is directed, returns the sum of in degree + out degree
 int getID()
          returns the id assigned to this vertex, it is not guaranteed that this method returns the same as VertexModel.getId();
 java.lang.String getLabel()
           
 boolean isSelected()
           
 java.util.Iterator<EdgeModel> iterator()
           
 void putAtr(java.lang.String id, java.lang.Object atr)
           
 void setGraph(Graph g)
           
 void setID(int id)
          this method doesn'nt guarantee that two vertices does'nt have the same ID, if you want to have unique ids you can use Id's from model of vertices
 void setLabel(java.lang.String label)
           
 void setSelected(boolean isSelected)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

g

public Graph g

view

public VertexView view

model

public VertexModel model

control

public VertexControl control

blackboard

public BlackBoard blackboard

ctr

public static int ctr

LOCATION

public static final java.lang.String LOCATION
See Also:
Constant Field Values
Constructor Detail

Vertex

public Vertex(Vertex v)
the opy constructor, the new vertex will be a copy of the given vertex

Parameters:
v -

Vertex

public Vertex()

Vertex

public Vertex(BlackBoard b)
Method Detail

setGraph

public void setGraph(Graph g)

getDegree

public int getDegree()
returns the degree of the vertex, (if the graph is directed, returns the sum of in degree + out degree


iterator

public java.util.Iterator<EdgeModel> iterator()
Specified by:
iterator in interface java.lang.Iterable<EdgeModel>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setSelected

public void setSelected(boolean isSelected)

isSelected

public boolean isSelected()

getID

public int getID()
returns the id assigned to this vertex, it is not guaranteed that this method returns the same as VertexModel.getId();


setID

public void setID(int id)
this method doesn'nt guarantee that two vertices does'nt have the same ID, if you want to have unique ids you can use Id's from model of vertices

Parameters:
id -

getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String label)

putAtr

public void putAtr(java.lang.String id,
                   java.lang.Object atr)

getAtr

public <t> t getAtr(java.lang.String id)