GraphLab Project

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

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

public class DragEdge
extends AbstractAction
implements PaintHandler, Undoable

Author:
Rouzbeh Ebrahimi, Azin Azadi Email: ruzbehus@gmail.com

Field Summary
protected  EdgeModel edge
           
protected  GraphModel g
           
 
Fields inherited from class graphlab.platform.core.AbstractAction
blackboard
 
Constructor Summary
DragEdge(BlackBoard bb)
          constructor
 
Method Summary
protected  void addUndoData(EdgeModel e, GraphPoint oldPos, GraphPoint newPos)
           
 void paint(java.awt.Graphics g, java.lang.Object destinationComponent, java.lang.Boolean drawExtras)
           
 void performAction(java.lang.String eventName, java.lang.Object value)
          like Action
 void redo(UndoableActionOccuredData uaod)
           
protected  void startPainting(EdgeModel e)
           
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

edge

protected EdgeModel edge

g

protected GraphModel g
Constructor Detail

DragEdge

public DragEdge(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()

startPainting

protected void startPainting(EdgeModel e)

paint

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

addUndoData

protected void addUndoData(EdgeModel e,
                           GraphPoint oldPos,
                           GraphPoint newPos)

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