GraphLab Project

graphlab.plugins.main.core.actions.edge
Class AddEdge

java.lang.Object
  extended by graphlab.platform.core.AbstractAction
      extended by graphlab.plugins.main.core.actions.edge.AddEdge
All Implemented Interfaces:
PaintHandler, Action, Listener, Undoable

public class AddEdge
extends AbstractAction
implements PaintHandler, Undoable

Author:
azin azadi

Field Summary
protected  VertexModel curVertexUnderMouse
           
protected  int cx
           
protected  int cy
           
protected  GraphModel g
           
protected  AbstractGraphRenderer gv
           
protected  boolean isClick
           
protected  boolean isDrag
           
protected  VertexModel v1
           
protected  VertexModel vc1
           
protected  int x1
           
protected  int y1
           
 
Fields inherited from class graphlab.platform.core.AbstractAction
blackboard
 
Constructor Summary
AddEdge(BlackBoard bb)
          constructor
 
Method Summary
protected  void addUndoData(EdgeModel e, GraphModel g)
           
static EdgeModel doJob(GraphModel g, VertexModel v1, VertexModel v2)
           
 void paint(java.awt.Graphics g, java.lang.Object component, java.lang.Boolean drawExtras)
           
 void performAction(java.lang.String eventName, java.lang.Object value)
          like Action
 void redo(UndoableActionOccuredData uaod)
           
protected  void startPainting()
           
protected  void stopPainting()
           
 void undo(UndoableActionOccuredData uaod)
           
 
Methods inherited from class graphlab.platform.core.AbstractAction
disable, enable, getBlackBoard, getLastListenedEventKey, isEnable, keyChanged, listen4Event, setBlackBoard, unListenEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

v1

protected VertexModel v1

vc1

protected VertexModel vc1

g

protected GraphModel g

gv

protected AbstractGraphRenderer gv

isClick

protected boolean isClick

isDrag

protected boolean isDrag

x1

protected int x1

y1

protected int y1

cx

protected int cx

cy

protected int cy

curVertexUnderMouse

protected VertexModel curVertexUnderMouse
Constructor Detail

AddEdge

public AddEdge(BlackBoard bb)
constructor

Parameters:
bb - the blackboard of the action
Method Detail

performAction

public void performAction(java.lang.String eventName,
                          java.lang.Object value)
Description copied from class: AbstractAction
like Action

Specified by:
performAction in interface Action
Specified by:
performAction in class AbstractAction

stopPainting

protected void stopPainting()

addUndoData

protected void addUndoData(EdgeModel e,
                           GraphModel g)

startPainting

protected void startPainting()

doJob

public static EdgeModel doJob(GraphModel g,
                              VertexModel v1,
                              VertexModel v2)

paint

public void paint(java.awt.Graphics g,
                  java.lang.Object component,
                  java.lang.Boolean drawExtras)
Specified by:
paint in interface PaintHandler

undo

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

redo

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

GraphLab Project