Skip to content

Commit

Permalink
make it easier to override how nodes are dragged
Browse files Browse the repository at this point in the history
  • Loading branch information
dound committed May 14, 2009
1 parent b5e9a1e commit be0c2b8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions gui/src/org/pzgui/PZWindowEventListener.java
Expand Up @@ -224,10 +224,21 @@ public void mouseDragged(MouseEvent e) {
}
}
else {
// if a node is selected, handle dragging it
selNode.drag(x, y);
dragNode(selNode, x, y);
}
}

/**
* Called when a node has been dragged.
*
* @param selNode the node being dragged
* @param x current x coordinate of the drag
* @param y current y coordinate of the drag
*/
public void dragNode(Drawable selNode, int x, int y) {
// if a node is selected, handle dragging it
selNode.drag(x, y);
}

/** Tells the manager where the mouse is now. */
public void mouseMoved(MouseEvent e) {
Expand Down

0 comments on commit be0c2b8

Please sign in to comment.