Permalink
Browse files

make it easier to override how nodes are dragged

  • Loading branch information...
dound committed May 14, 2009
1 parent b5e9a1e commit be0c2b88f2bb542a039f44148463badbb73cb4fb
Showing with 13 additions and 2 deletions.
  1. +13 −2 gui/src/org/pzgui/PZWindowEventListener.java
@@ -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) {

0 comments on commit be0c2b8

Please sign in to comment.