graphlab.gui.plugins.main.core.actions.vertex
Class AddVertex

java.lang.Object
  extended by graphlab.main.core.action.AbstractAction
      extended by graphlab.gui.plugins.main.core.actions.vertex.AddVertex
All Implemented Interfaces:
Undoable, Action, Notifiable

public class AddVertex
extends AbstractAction
implements Undoable

Adds a vertex to the graph: listens for "graph select point" & ...

Author:
azin azadi

Field Summary
static java.lang.String DISABLE
           
 
Fields inherited from class graphlab.main.core.action.AbstractAction
listeningEvents
 
Constructor Summary
AddVertex(BlackBoard bb)
           
 
Method Summary
static Vertex doJob(Graph g)
          adds a vertex to a random position of the graph return the added vertex
static Vertex doJob(Graph g, int x, int y)
          adds a vertex to the given location of graph
 void performJob(java.lang.String name)
          like Action
 void redo(UndoableActionOccuredData uaod)
           
 void undo(UndoableActionOccuredData uaod)
           
 
Methods inherited from class graphlab.main.core.action.AbstractAction
disable, doJob, enable, getBlackBoard, isEnable, setBlackBoard
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLE

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

AddVertex

public AddVertex(BlackBoard bb)
Method Detail

performJob

public void performJob(java.lang.String name)
Description copied from class: AbstractAction
like Action

Specified by:
performJob in class AbstractAction

doJob

public static Vertex doJob(Graph g,
                           int x,
                           int y)
adds a vertex to the given location of graph

Returns:
the added vertex

doJob

public static Vertex doJob(Graph g)
adds a vertex to a random position of the graph return the added vertex


undo

public void undo(UndoableActionOccuredData uaod)
Specified by:
undo in interface Undoable

redo

public void redo(UndoableActionOccuredData uaod)
Specified by:
redo in interface Undoable