graphlab.plugins.main.core.actions.vertex
Class AddVertex
java.lang.Object
graphlab.platform.core.AbstractAction
graphlab.plugins.main.core.actions.vertex.AddVertex
- All Implemented Interfaces:
- Action, Listener, Undoable
public class AddVertex
- extends AbstractAction
- implements Undoable
Adds a vertex to the graph: listens for "graph select point" & ...
- Author:
- azin azadi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DISABLE
public static final java.lang.String DISABLE
- See Also:
- Constant Field Values
sd
protected SubGraph sd
AddVertex
public AddVertex(BlackBoard bb)
performAction
public void performAction(java.lang.String key,
java.lang.Object value)
- Description copied from class:
AbstractAction
- like Action
- Specified by:
performAction
in interface Action
- Specified by:
performAction
in class AbstractAction
doJob
public static VertexModel doJob(GraphModel g,
int x,
int y)
- adds a vertex to the given location of graph
- Returns:
- the added vertex
doJob
public static VertexModel doJob(GraphModel g,
GraphPoint position)
- adds a vertex to the given location of graph
- Returns:
- the added vertex
addVertexToRandomPosition
public static VertexModel addVertexToRandomPosition(GraphModel 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